/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.

Get Certified Get Ahead

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

SYO-401 Practice Test Questions Now Available

Over 440 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 - 100 random questions. View 100 random questions from the full test bank similar to how the Security+ exam has a potential maximum of 100 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 Security+ Practice Test Questions Here

 SYO-401 Practice Test Questions Now Available


INCLUDES QUESTIONS TO HELP YOU PREPARE

FOR THE NEW PERFORMANCE BASED QUESTIONS 

Bonus - Performance Based Questions

Additional Security+ questions to help you prepare for the new performance based questions. These are included with the full bank of Security+ practice test questions and are divided into different sections. For example, you'll have access to the following links:

- Performance Based Question - Set 1

You'll see a graphic explaining what you might be required to do on the actual exam to match different types of security to mobile devices and servers in a data center. You'll then have two questions that test your knowledge and ability to correctly answer the questions. This question also includes a link to a graphic showing the end solution for the overall performance based question simulation.

- Performance Based Question - Set 2

You'll see a graphic explaining what you might be required to do on the actual exam to match different types of attacks with the name of the attack type. You'll then have five questions that test your knowledge and ability to correctly answer the questions. This question also includes a link to a graphic showing the end solution for the overall performance based question simulation.

- Performance Based Question - Set 3

You'll see a graphic showing a network with computers and servers separated by a firewall. The firewall is used to control traffic between the computers and users using rules within an access control list (ACL).  You'll have three questions that test your knowledge and ability to correctly identify the relevant components of the rule. The incorrect answers and explanation provide you with insight into how to correctly answer this type of question on the actual exam.

- Performance Based Question - Set 4

You'll see a graphic explaining what you might be required to do on the actual exam related to what a forensic analyst would do during an investigation. You'll then have two questions that test your knowledge and ability to correctly answer the questions. This question also includes a link to a graphic showing the end solution for the overall performance based question simulation.

- Performance Based Question - Set 5

You'll see a graphic explaining what you might be required to do on the actual exam to match protocols and ports. You'll then have seven questions that test your knowledge and ability to correctly answer the questions. This question also includes a link to a graphic showing the end solution for the overall performance based question simulation.

- Performance Based Question - Set 6

You'll see a list of security controls along with a graphic showing devices and locations within an organization, along with instructions on what you might be required to do on the actual exam to match the controls with the devices and locations. You'll then have four questions that test your knowledge and ability to correctly answer the questions. This question also includes a link to a graphic showing the end solution for the overall performance based question simulation.

- Performance Based Question - Set 7

You'll see a list of authentication methods and authentication factors along with instructions on what you might be required to do on the actual exam to match the authentication methods with the authentication factors. You'll then have six questions that test your knowledge and ability to correctly answer the questions. This set also includes a link to a graphic showing the end solution for the overall performance based question simulation.

- Performance Based Question - Set 8

You'll see a graphic explaining what you might be required to do on the actual exam to match different types of attacks with the name of the attack type. You'll then have five questions that test your knowledge and ability to correctly answer the questions. This is similar to Set 2 but expands on the possibilities. The set also includes a link to a page showing the end solution for the overall performance based question simulation.

New - Performance Based Question - Set 9

New questions recently added using a different testing engine. See a demo here. This set includes drag and drop and matching questions on ports.

New - Performance Based Question - Set 10

A random set of 20 performance-based questions using drag and drop, matching, sorting, and fill in-the blank. This set includes performance-based questions on RAID.

Get the full bank of Security+ Practice Test Questions Here

Get the full bank of Security+ Practice Test Questions

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

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

Subscribe To Our Newsletter

Join our mailing list and get a free excerpt of the CompTIA Security+: Get Certified Get Ahead: SY0-401 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.