Cisco Fabric Manager Security Configuration Guide
Configuring IPv4 and IPv6 Access Control Lists
Downloads: This chapterpdf (PDF - 349.0KB) The complete bookPDF (PDF - 5.08MB) | Feedback

Configuring IPv4 and IPv6 Access Control Lists

Table Of Contents

Configuring IPv4 and IPv6 Access Control Lists

About IPv4 and IPv6 Access Control Lists

IPv4-ACL and IPv6-ACL Configuration Guidelines

About Filter Contents

Protocol Information

Address Information

Port Information

ICMP Information

ToS Information

Creating IPv4-ACLs or IPv6-ACLs with the IP-ACL Wizard

Creating IPv4-ACLs or IPv6-ACLs

Removing IP Filters from an Existing IPv4-ACL or IPv6-ACL

Deleting IP-ACLs

Reading the IP-ACL Log Dump

Applying an IP-ACL to an Interface

Applying an IP-ACL to mgmt0

Example IP-ACL Configuration


Configuring IPv4 and IPv6 Access Control Lists


Cisco MDS 9000 Family switches can route IP version 4 (IPv4) traffic between Ethernet and Fibre Channel interfaces. The IP static routing feature routes traffic between VSANs. To do so, each VSAN must be in a different IPv4 subnetwork. Each Cisco MDS 9000 Family switch provides the following services for network management systems (NMS):

IP forwarding on the out-of-band Ethernet interface (mgmt0) on the front panel of the supervisor modules.

IP forwarding on the in-band Fibre Channel interface using the IP over Fibre Channel (IPFC) function—IPFC specifies how IP frames can be transported over Fibre Channel using encapsulation techniques. IP frames are encapsulated into Fibre Channel frames so NMS information can cross the Fibre Channel network without using an overlay Ethernet network.

IP routing (default routing and static routing)—If your configuration does not need an external router, you can configure a default route using static routing.

Switches are compliant with RFC 2338 standards for Virtual Router Redundancy Protocol (VRRP) features. VRRP is a restartable application that provides a redundant, alternate path to the gateway switch.

IPv4 Access Control Lists (IPv4-ACLs and IPv6-ACLs) provide basic network security to all switches in the Cisco MDS 9000 Family. IPv4-ACLs and IPv6-ACLs restrict IP-related traffic based on the configured IP filters. A filter contains the rules to match an IP packet, and if the packet matches, the rule also stipulates if the packet should be permitted or denied.

Each switch in the Cisco MDS 9000 Family can have a maximum total of 128 IPv4-ACLs or 128 IPv6-ACLs and each IPv4-ACL or IPv6-ACL can have a maximum of 256 filters.

This chapter includes the following sections:

IPv4-ACL and IPv6-ACL Configuration Guidelines

About Filter Contents

Creating IPv4-ACLs or IPv6-ACLs with the IP-ACL Wizard

Creating IPv4-ACLs or IPv6-ACLs

Reading the IP-ACL Log Dump

Applying an IP-ACL to an Interface

Example IP-ACL Configuration

About IPv4 and IPv6 Access Control Lists

Cisco MDS 9000 Family switches can route IP version 4 (IPv4) traffic between Ethernet and Fibre Channel interfaces. The IP static routing feature routes traffic between VSANs. To do so, each VSAN must be in a different IPv4 subnetwork. Each Cisco MDS 9000 Family switch provides the following services for network management systems (NMS):

IP forwarding on the out-of-band Ethernet interface (mgmt0) on the front panel of the supervisor modules.

IP forwarding on the in-band Fibre Channel interface using the IP over Fibre Channel (IPFC) function—IPFC specifies how IP frames can be transported over Fibre Channel using encapsulation techniques. IP frames are encapsulated into Fibre Channel frames so NMS information can cross the Fibre Channel network without using an overlay Ethernet network.

IP routing (default routing and static routing)—If your configuration does not need an external router, you can configure a default route using static routing.

IPv4 Access Control Lists (IPv4-ACLs and IPv6-ACLs) provide basic network security to all switches in the Cisco MDS 9000 Family. IPv4-ACLs and IPv6-ACLs restrict IP-related traffic based on the configured IP filters. A filter contains the rules to match an IP packet, and if the packet matches, the rule also stipulates if the packet should be permitted or denied.

Each switch in the Cisco MDS 9000 Family can have a maximum total of 128 IPv4-ACLs or 128 IPv6-ACLs and each IPv4-ACL or IPv6-ACL can have a maximum of 256 filters.

IPv4-ACL and IPv6-ACL Configuration Guidelines

Follow these guidelines when configuring IPv4-ACLs or IPv6-ACLs in any switch or director in the Cisco MDS 9000 Family:

You can apply IPv4-ACLs or IPv6-ACLs to VSAN interfaces, the management interface, Gigabit Ethernet interfaces on IPS modules and MPS-14/2 modules, and Ethernet PortChannel interfaces.


Tip If IPv4-ACLs or IPv6-ACLs are already configured in a Gigabit Ethernet interface, you cannot add this interface to an Ethernet PortChannel group. See Cisco MDS 9000 Family NX-OS IP Services Configuration GuideCisco Fabric Manager IP Services Configuration Guide for guidelines on configuring IPv4-ACLs.



Caution Do not apply IPv4-ACLs or IPv6-ACLs to only one member of a PortChannel group. Apply IPv4-ACLs or IPv6-ACLs to the entire channel group.

Configure the order of conditions accurately. As the IPv4-ACL or the IPv6-ACL filters are sequentially applied to the IP flows, only the first match determines the action taken. Subsequent matches are not considered. Be sure to configure the most important condition first. If no conditions match, the software drops the packet.

Configure explicit deny on the IP Storage Gigabit Ethernet ports to apply IP ACLs because implicit deny does not take effect on these ports.

About Filter Contents

An IP filter contains rules for matching an IP packet based on the protocol, address, port, ICMP type, and type of service (TS).

This section includes the following topics:

Protocol Information

Address Information

Port Information

ICMP Information

ToS Information

Protocol Information

The protocol information is required in each filter. It identifies the name or number of an IP protocol. You can specify the IP protocol in one of two ways:

Specify an integer ranging from 0 to 255. This number represents the IP protocol.

Specify the name of a protocol including, but not restricted to, Internet Protocol (IP), Transmission Control Protocol (TCP), User Datagram Protocol (UDP), and Internet Control Message Protocol (ICMP).


Note When configuring IPv4-ACLs or IPv6-ACLs on Gigabit Ethernet interfaces, only use the TCP or ICMP options.


Address Information

The address information is required in each filter. It identifies the following details:

Source—The address of the network or host from which the packet is being sent.

Source-wildcard—The wildcard bits applied to the source.

Destination—The number of the network or host to which the packet is being sent.

Destination-wildcard—The wildcard bits applied to the destination.

Specify the source and source-wildcard or the destination and destination-wildcard in one of two ways:

Using the 32-bit quantity in four-part, dotted decimal format (10.1.1.2/0.0.0.0 is the same as host 10.1.1.2).

Each wildcard bit set to zero indicates that the corresponding bit position in the packet's IPv4 address must exactly match the bit value in the corresponding bit position in the source.

Each wildcard bit set to one indicates that both a zero bit and a one bit in the corresponding position of the packet's IPv4 or IPv6 address will be considered a match to this access list entry. Place ones in the bit positions you want to ignore. For example, 0.0.255.255 requires an exact match of only the first 16 bits of the source. Wildcard bits set to one do not need to be contiguous in the source-wildcard. For example, a source-wildcard of 0.255.0.64 would be valid.

Using the any option as an abbreviation for a source and source-wildcard or destination and destination-wildcard (0.0.0.0/255.255.255.255)

Port Information

The port information is optional. To compare the source and destination ports, use the eq (equal) option, the gt (greater than) option, the lt (less than) option, or the range (range of ports) option. You can specify the port information in one of two ways:

Specify the number of the port. Port numbers range from 0 to 65535. Table 5-1 displays the port numbers recognized by the Cisco NX-OS software for associated TCP and UDP ports.

Specify the name of a TCP or UDP port as follows:

TCP port names can only be used when filtering TCP.

UDP port names can only be used when filtering UDP.

Table 5-1 TCP and UDP Port Numbers 

Protocol
Port
Number

UDP

dns

53

tftp

69

ntp

123

radius accounting

1646 or 1813

radius authentication

1645 or 1812

snmp

161

snmp-trap

162

syslog

514

TCP1

ftp

20

ftp-data

21

ssh

22

telnet

23

smtp

25

tasacs-ds

65

www

80

sftp

115

http

143

wbem-http

5988

wbem-https

5989

1 If the TCP connection is already established, use the established option to find matches. A match occurs if the TCP datagram has the ACK, FIN, PSH, RST, or URG control bit set.


ICMP Information

IP packets can be filtered based on the following optional ICMP conditions:

icmp-type—The ICMP message type is a number from 0 to 255.

icmp-code—The ICMP message code is a number from 0 to 255.

Table 5-2 displays the value for each ICMP type.

Table 5-2 ICMP Type Value 

ICMP Type 1
Code

echo

8

echo-reply

0

destination unreachable

3

traceroute

30

time exceeded

11

1 ICMP redirect packets are always rejected.


ToS Information

IP packets can be filtered based on the following optional ToS conditions:

ToS level—The level is specified by a number from 0 to 15.

ToS name—The name can be max-reliability, max-throughput, min-delay, min-monetary-cost, and normal.

Creating IPv4-ACLs or IPv6-ACLs with the IP-ACL Wizard

Traffic coming into the switch is compared to IPv4-ACL or IPv6-ACL filters based on the order that the filters occur in the switch. New filters are added to the end of the IPv4-ACL or the IPv6-ACL. The switch keeps looking until it has a match. If no matches are found when the switch reaches the end of the filter, the traffic is denied. For this reason, you should have the frequently hit filters at the top of the filter. There is an implied deny for traffic that is not permitted. A single-entry IPv4-ACL or IPv6-ACL with only one deny entry has the effect of denying all traffic.

To configure an IPv4-ACL or an IPv6-ACL, follow these steps:


Step 1 Create an IPv4-ACL or an IPv6-ACL by specifying a filter name and one or more access condition(s). Filters require the source and destination address to match a condition. Use optional keywords to configure finer granularity.


Note The filter entries are executed in sequential order. You can only add the entries to the end of the list. Take care to add the entries in the correct order.


Step 2 Apply the access filter to specified interfaces.


To create an ordered list of IP filters in a named IPv4-ACL or IPv6-ACL profile using the IPv4-ACL Wizard in Fabric Manager, follow these steps:


Step 1 Click the IP ACL Wizard icon from the Fabric Manager toolbar (see Figure 5-1).

Figure 5-1 IP ACL Wizard

You see the IP ACL Wizard.

Step 2 Enter a name for the IP-ACL.


Note If you are creating an IPv6-ACL, check the IPv6 check box.


Step 3 Click Add to add a new rule to this IP-ACL. You see a new rule in the table with default values.

Step 4 Modify the Source IP and Source Mask as necessary for your filter.


Note The IP-ACL Wizard only creates inbound IP filters.


Step 5 Choose the appropriate filter type from the Application drop-down list.

Step 6 Choose permit or deny from the Action drop-down list.

Step 7 Repeat Step 3 through Step 6 for additional IP filters.

Step 8 Click Up or Down to order the filters in this IP-ACL.


Tip Order the IP filters carefully. Traffic is compared to the IP filters in order. The first match is applied and the rest are ignored.


Step 9 Click Next.

You see a list of switches that you can apply this IP-ACL.

Step 10 Uncheck any switches that you do not want to apply this IP-ACL.

Step 11 Select the Interface you want to apply this IP-ACL.

Step 12 Click Finish to create this IP-ACL and apply it to the selected switches.


Creating IPv4-ACLs or IPv6-ACLs

To add entries to an existing IPv4-ACL or an IPv6-ACL using Device Manager, follow these steps:


Step 1 Choose Security > IP ACL.

You see the IP ACL dialog box shown in Figure 5-2.

Figure 5-2 IP ACL Dialog Box

Step 2 Click Create to create an IP-ACL profile.

You see the Create IP ACL Profiles dialog box shown in Figure 5-3.

Figure 5-3 Create IP ACL Profiles Dialog Box

Step 3 Enter an IP-ACL profile name.

Step 4 Click Create and then click Close.

This creates a new IP-ACL profile.

Step 5 Click the IP-ACL you created and click Rules.

After you create an IPv4-ACL or an IPv6-ACL, you can add subsequent IP filters at the end of the IPv4-ACL or the IPv6-ACL if you are using Device Manager. Fabric Manager allows you to reorder existing rules for a profile. You cannot insert filters in the middle of an IPv4-ACL or an IPv6-ACL. Each configured entry is automatically added to the end of a IPv4-ACL or an IPv6-ACL.

You see the IP ACL dialog box shown in Figure 5-4.

Figure 5-4 IP ACL Profile Dialog Box

Step 6 Click Create to create an IP filter.

You see the Create IP Filter dialog box shown in Figure 5-5.

Figure 5-5 Create IP Filter Dialog Box

Step 7 Choose either permit or deny for the Action and set the IP Number in the Protocol field. The drop-down menu provides common filtered protocols.

Step 8 Set the source IP address you want this filter to match against and the wildcard mask, or check the any check box to match this filter against any IP address.

This creates an IP filter that will check the source IP address of frames.


Note The wildcard mask denotes a subset of the IP address you want to match against. This allows a range of addresses to match against this filter.


Step 9 Set the transport layer source port range if the protocol chosen is TCP or UDP.

Step 10 Repeat Step 8 and Step 9 for the destination IP address and port range.

This creates an IP filter that will check the destination IP address of frames.

Step 11 Set the ToS, ICMPType, and ICMPCode fields as appropriate.

Step 12 Check the TCPEstablished check box if you want to match TCP connections with ACK,FIN,PSH,RST,SYN or URG control bits set.

Step 13 Check the LogEnabled check box if you want to log all frames that match this IP filter.

Step 14 Click Create to create this IP filter and add it to your IP-ACL.


Removing IP Filters from an Existing IPv4-ACL or IPv6-ACL

To remove configured entries from an IPv4-ACL or an IPv6-ACL using Device Manager, follow these steps:


Step 1 Choose Security > IP ACLs.

You see the IP-ACL dialog box (see Figure 5-2).

Step 2 Click the IP-ACL you want to modify and click Rules.

You see the list of IP filters associated with this IP-ACL (see Figure 5-4).

Step 3 Select the filter that you want to delete and click Delete to delete that IP filter.


Deleting IP-ACLs

You must delete the association between the IP-ACL and interfaces before deleting the IP-ACL.

To delete an IP-ACL using Fabric Manager, follow these steps:


Step 1 Expand Switches > Security and then select IP ACL from the Physical Attributes pane.

You see the IP-ACL configuration in the Information pane.

Step 2 Click the Profiles tab.

You see a list of switches, ACLs, and profile names.

Step 3 Select the row you want to delete. To delete multiple rows, hold down the Shift key while selecting rows.

Step 4 Click Delete Row. The IP-ACLs are deleted.


Reading the IP-ACL Log Dump

Use the LogEnabled check box option during IP filter creation to log information about packets that match this filter. The log output displays the ACL number, permit or deny status, and port information.

For the input ACL, the log displays the raw MAC information. The keyword "MAC=" does not refer to showing an Ethernet MAC frame with MAC address information. It refers to the Layer 2 MAC-layer information dumped to the log. For the output ACL, the raw Layer 2 information is not logged.

The following example is an input ACL log dump:

Jul 17 20:38:44 excal-2 
%KERN-7-SYSTEM_MSG:
%IPACL-7-DENY:IN=vsan1 OUT= 
MAC=10:00:00:05:30:00:47:df:10:00:00:05:30:00:8a:1f:aa:aa:03:00:00:00:08:00:45:00:00:54:00
:00:40:00:40:01:0e:86:0b:0b:0b:0c:0b:0b:0b:02:08:00:ff:9c:01:15:05:00:6f:09:17:3f:80:02:01
:00:08:09:0a:0b:0c:0d:0e:0f:10:11:12:13:14:15:16:17:18:19:1a:1b:1c:1d:1e:1f:20:21:22:23:24
:25:26:27:28:29:2a:2b SRC=11.11.11.12 DST=11.11.11.2 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=0 
DF PROTO=ICMP TYPE=8 CODE=0 ID=277 SEQ=1280

The following example is an output ACL log dump:

Jul 17 20:38:44 excal-2 
%KERN-7-SYSTEM_MSG:
%IPACL-7-DENY:IN= OUT=vsan1 SRC=11.11.11.2 DST=11.11.11.12 LEN=84 TOS=0x00 PREC=0x00 
TTL=255 ID=38095 PROTO=ICMP TYPE=0 CODE=0 ID=277 SEQ=1280

Applying an IP-ACL to an Interface

You can define IP-ACLs without applying them. However, the IP-ACLs will have no effect until they are applied to an interface on the switch. You can apply IP-ACLs to VSAN interfaces, the management interface, Gigabit Ethernet interfaces on IPS modules and MPS-14/2 modules, and Ethernet PortChannel interfaces.


Tip Apply the IP-ACL on the interface closest to the source of the traffic.


When you are trying to block traffic from source to destination, you can apply an inbound IPv4-ACL to M0 on Switch 1 instead of an outbound filter to M1 on Switch 3 (see Figure 5-6).

Figure 5-6 Denying Traffic on the Inbound Interface

The access-group option controls access to an interface. Each interface can only be associated with one IP-ACL per direction. The ingress direction can have a different IP-ACL than the egress direction. The IP-ACL becomes active when applied to the interface.


Tip Create all conditions in an IP-ACL before applying it to the interface.



Caution If you apply an IP-ACL to an interface before creating it, all packets in that interface are dropped because the IP-ACL is empty.

The terms in, out, source, and destination are used as referenced by the switch:

In—Traffic that arrives at the interface and goes through the switch; the source is where it transmitted from and the destination is where it is transmitted to (on the other side of the router).


Tip The IP-ACL applied to the interface for the ingress traffic affects both local and remote traffic.


Out—Traffic that has already been through the switch and is leaving the interface; the source is where it transmitted from and the destination is where it is transmitted to.


Tip The IP-ACL applied to the interface for the egress traffic only affects local traffic.


Applying an IP-ACL to mgmt0

A system default ACL called mgmt0 exists on the mgmt0 interface. This ACL is not visible to the user, so mgmt0 is a reserved ACL name that cannot be used. The mgmt0 ACL blocks most ports and only allows access to required ports in compliance to accepted security policies.

To apply an IP-ACL to an interface using Fabric Manager, follow these steps:


Step 1 Expand Switches > Security and then select IP ACL in the Physical Attributes pane.

You see the IP-ACL configuration in the Information pane.

Step 2 Click the Interfaces tab.

You see a list of interfaces and associated IP-ACLs.

Step 3 Click Create Row.

You see the Create Interfaces dialog box shown in Figure 5-7.

Figure 5-7 Create Interfaces Dialog Box

Step 4 (Optional) Remove the switches you do not want to include in the IP-ACL by unchecking the check boxes next to the switch addresses.

Set the interface you want associated with an IPv4-ACL or IPv6-ACL in the Interface field.

Step 5 Choose a ProfileDirection (either inbound or outbound).

Step 6 Enter the IP-ACL name in the Profile Name field.


Note This IP-ACL name must have already been created using the Create Profiles dialog box. If not, no filters will be enabled until you to go to the Create Profiles dialog box and create the profile.


Step 7 Click Create to associate the IP-ACL.

You see the newly associated access list in the list of IP-ACLs.


Example IP-ACL Configuration

To define an IP-ACL that restricts management access using Device Manager, follow these steps:


Step 1 Choose Security > IP ACL.

You see the IP-ACL dialog box in Figure 5-2.

Step 2 Click Create to create an IP-ACL.

You see the Create IP ACL Profiles dialog box shown in Figure 5-3.

Step 3 Enter RestrictMgmt as the profile name and click Create.

This creates an empty IP-ACL named RestrictMgmt (see Figure 5-8).

Figure 5-8 RestrictMgmt Profile Added to the List

Step 4 Select RestrictMgmt and click Rules.

You see an empty list of IP filters associated with this IP-ACL.

Step 5 Click Create to create the first IP filter.

You see the Create IP Filter dialog box shown in Figure 5-5.

Step 6 Create an IP filter to allow management communications from a trusted subnet:

a. Choose the permit Action and select 0 IP from the Protocol drop-down menu.

b. Set the source IP address to 10.67.16.0 and the wildcard mask to 0.0.0.255.


Note The wildcard mask denotes a subset of the IP address you want to match against. This allows a range of addresses to match against this filter.


c. Check the any check box for the destination address.

d. Click Create to create this IP filter and add it to the RestrictMgmt IP-ACL.

Repeat Step a through Step d to create an IP filter that allows communications for all addresses in the 10.67.16.0/24 subnet.

Step 7 Create an IP filter to allow ICMP ping commands:

a. Choose the permit Action and select 1-ICMP from the Protocol drop-down menu.

b. Check the any check box for the source address.

c. Check the any check box for the destination address.

d. Select 8 echo from the ICMPType drop-down menu.

e. Click Create to create this IP filter and add it to the RestrictMgmt IP-ACL.

Repeat Step a through Step e to create an IP filter that allows ICMP ping.

Step 8 Create a final IP Filter to block all other traffic:

a. Choose the deny Action and select 0 IP from the Protocol drop-down menu.

b. Check the any check box for the source address.

c. Check the any check box for the destination address.

d. Click Create to create this IP filter and add it to the RestrictMgmt IP-ACL.

e. Click Close to close the Create IP Filter dialog box.

Repeat Step a through Step d to create an IP filter that blocks all other traffic.

Step 9 Apply the RestrictMgmt IP ACL to the mgmt0 interface:

a. Click Security, select IP ACL and then click the Interfaces tab in the IP ACL dialog box.

b. Click Create.

You see the Create IP-ACL Interfaces dialog box.

c. Select mgmt0 from the Interfaces drop-down menu.

d. Select the inbound Profile Director.

e. Select RestrictMgmt from the ProfileName drop-down menu.

f. Click Create to apply the RestrictMgmt IP-ACL to the mgmt0 interface.

Repeat Step a through Step f to apply the new IP-ACL to the mgmt0 interface.