/32 in an ACL

Posted by in Security+ | 2 comments

I’ve recently fielded a few queries on the usage of /24 versus /32 in an access control list (ACL) rule. As an example, consider this practice test question:

Q. You need to configure a firewall to allow traffic from Homer’s computer to all of the servers within the 192.168.8.0/24 network. The following graphic shows a partial network diagram. Click it to view the image in full size.

Which of the following choices is the BEST to identify the source in the ACL rule?

A. 192.168.5.10/24

B. 192.168.5.10/32

C. 192.168.10.0/24

D. 192.168.10.0/32

Do you know the answer? More, do you know why the correct answer is correct and the incorrect answers are incorrect? The answer and explanation is available at the end of this post.

ACL Rules

ACL rules typically include the following information:

  • Permission (allow or deny)
  • Destination protocol (typically TCP, UDP, or ANY)
  • Destination port (the port used on the destination system)
  • Source IP address (where traffic is coming from)
  • Destination IP address (where traffic is going to)

As an example, if you want to allow HTTPS traffic from the 192.168.5.0/24 network to the 192.168.8.0/24 network, you would use the following information in the rule.

PermissionProtocolPortSourceDestination
AllowTCP443192.168.5.0/24192.168.8.0/24

Note that all routers and firewalls don’t put this information in the same order. The important point is to understand the five elements (permission, protocol, port, source, and destination),

CIDR Notation

Classless Inter-Domain Routing (CIDR) notation expresses the subnet mask as a forward slash followed by a number (such as /24).

Consider an IP address of 192.168.1.10 with a subnet mask of 255.255.255.0. Using CIDR notation, you would  express this as 192.168.1.10/24.

Remember that an IPv4 address is 32 bits long and the subnet mask is 32 bits long. You could express the IP address and subnet mask in binary like this:

IP address 192.168.1.10: 1100 0000 . 1010 1000 . 0000 0001 . 0000 1010

Subnet Mask 255.255.255.0: 1111 1111 . 1111 1111 . 1111 1111 . 0000 0000

Count the number of 1 bits in the subnet mask. You see that the first set is 8 bits, the second set is 8 bits, and the third set is 8 bits. The subnet mask has a total of 24 bits that are 1s so we can express this as /24 instead of 255.255.255.0.

CIDR Notation in an ACL Rule

Many routers and firewalls require you to combine the subnet mask (entered with CIDR notation) with the IP address.

As an example, imagine that you want to allow all traffic from computers in the 192.168.5.0/24 network to all computers in the 192.168.8.0/24 network.

The source is 192.168.5.0/24.

The destination is 192.168.8.0/24.

Using /32 in the ACL

What if you only want to allow traffic from a single computer (or to a single computer)?

As an example, what if you want to allow Lisa’s computer to send traffic to any of the servers in the 192.168.8.0/24 network, how would you identify only Lisa’s computer.

You might think that you could use 192.168.5.11/24 as the source because that identifies Lisa’s computer.

However, many routers and firewalls don’t interpret this as a single IP address. Instead, they interpret it as 192.168.5.0/24 and allow traffic from all computers in the 192.168.5.0/24 network.

If you want to identify only a single computer in the rule, you need to use /32 to mask the entire IP address. In other words, you would enter 192.168.5.11/32 to identify the source. The /32 equates to 255.255.255.255 for the subnet mask.

Do all routers and firewalls use /32 in the ACL rules?

No. Vendors can implement rules differently.

However, if you’re preparing to take the Security+ exam you should be aware of this practice used by many vendors.


Security+ Practice Test Questions

SY0-501 Practice Test Questions 

Over 300 realistic Security+ practice test questions

All questions include explanations so you'll know why the correct answers are correct,

and why the incorrect answers are incorrect.

Pass the Security+ Exam

the First Time You Take It

Multiple quiz formats to let you use these questions based on the way you learn.
  • Learn mode - randomized. View each of the questions in random order. Learn mode allows you to keep selecting answers until you select the correct answer. Once you select the correct answer, you'll see the explanation. Click here to see how learn mode works.
  • Learn mode - not randomized. View each of the questions in the same order. Use this if you want to make sure that you see all of the questions. Learn mode allows you to keep selecting answers until you select the correct answer. Once you select the correct answer, you'll see the explanation. Click here to see how learn mode works.
  • Test mode - randomized. View each of the questions in random order. In test mode, you can only see the correct answers and explanations after you complete the test. Click here to see how test mode works.
  • Test mode - not randomized. View each of the questions in the same order. In test mode, you can only see the correct answers and explanations after you complete the test. Click here to see how test mode works.
  • Test mode - 75 random questions. View 75 random questions from the full test bank similar to how the Security+ exam has a potential maximum of 75 multiple choice questions. In test mode, you can only see the correct answers and explanations after you complete the test. Click here to see how test mode works.

Get the full bank of SY0-501 Practice Test Questions Here

 SY0-501 Practice Test Questions


INCLUDES QUESTIONS TO HELP YOU PREPARE

FOR THE NEW PERFORMANCE BASED QUESTIONS 

Bonus - Performance Based Questions

Three sets of performance-based questions including over 30 questions. These questions show you what you can expect in the live exam. They include drag and drop, matching, sorting, and fill in the blank questions. See a demo here.

Bonus - Extra Practice Test Questions

New multiple-choice questions in the extra test bank. Questions are added occasionally. You can see what has been added recently here.

Get the full bank of Security+ (SYO-501) Practice Test Questions Here

Get the full bank of Security+ Practice Test Questions

Click here if you're looking for SY0-501 Full Study Package

You need to configure a firewall to allow traffic from Homer’s computer to all of the servers within the 192.168.8.0/24 network. The following graphic shows a partial network diagram (click it to view the image in full size).

Which of the following choices is the BEST to identify the source in the ACL rule?

A. 192.168.5.10/24

B. 192.168.5.10/32

C. 192.168.8.0/24

D. 192.168.8.4/32

B is the correct answer. The question is asking for the source (where traffic is coming from) and Homer’s computer IP address is 192.168.5.5. Because you only want to allow traffic from Homer’s computer , you use CIDR notation of /32.

If you used CIDR notation of /24, it would allow traffic from any of the computers in the 192.168.5.0/24 subnet. However, the requirement is to only allow traffic from Homer’s computer.

The rule would also include the destination, which is any of the servers within the 192.168.8.0/24 network. However, the question isn’t asking for the destination.

If the destination was set as 192.168.8.4/32, it would only allow traffic to Web Server 1. Again though, the question isn’t asking for the destination and it also states that traffic to any servers in the 192.168.8.0/24 network should be allowed.

See Chapter 4 of the CompTIA Security+: Get Certified Get Ahead: SY0-401 Study Guide for more information on common attacks.

The following links include additional information on firewalls rules.

Security+ and Firewall Rules Video

Page 1 of 3 ACLs and Security+

Page 2 Firewall Rules and Security+

Page 3 Firewall Rules Solution

2 Comments

  1. Darril, the graphic in this question may not be right. The IP address for Homer in the graphic is 192.168.5.10, and the IP address in the (text) answer is 192.168.5.5. You may want to review and change one of them.

    • Thanks for the feedback. You’re correct and I just fixed it.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

CompTIA Security+ Get Certified Get Ahead: SY0-501 Study Guide

Subscribe To Our Newsletter

Join our mailing list and get a free excerpt of the CompTIA Security+: Get Certified Get Ahead: SY0-501 Study Guide.  This excerpt includes the introduction and Chapter 1. 

You have Successfully Subscribed!

Get Certified Get Ahead is a participant in the Amazon Services LLC Associates Program,
an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com.

Copyright © 2015 Get Certified Get Ahead. All Rights Reserved.