10-23-2018 04:16 AM - edited 02-21-2020 08:23 AM
Hi folks. My first attempt at configuring a ZBF on a 1117-4p ISR (I'm ccent studying for CCNA).
Prior to the ZBF commands being added to the running-config I was getting internet access (albeit with no security). Following this I get nothing - I can't PING, no web access, no DNS lookups which are the 3 types of traffic I'm initially allowing.
Not a massively complicated setup. I have no training on this but as I understand it, being stateful rules then return rules should not be required (should they) ?
In any case if anybody would be kind enough to look through my config and explain where I'm going wrong it would be massiv ely appreciated.
Script below. Cheers. Rob.
C1117ISR#sh run
Building configuration...
Current configuration : 5615 bytes
!
! Last configuration change at 09:15:14 GMT Tue Oct 23 2018 by rhbmcse
!
version 16.6
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
platform qfp utilization monitor load 80
no platform punt-keepalive disable-kernel-core
!
hostname C1117ISR
!
boot-start-marker
boot-end-marker
!
!
enable secret 9 $9$jUR3aCOMA9OFgU$o3a79MhakpqV2vfDatrcHCxftZzba///XoF5BMiuU6Q
!
no aaa new-model
clock timezone GMT -1 0
!
ip name-server 8.8.8.8 8.8.4.4
ip domain name 21RTM.local
ip dhcp excluded-address 192.168.0.1 192.168.0.19
ip dhcp excluded-address 192.168.0.51 192.168.0.254
ip dhcp excluded-address 10.0.0.1
!
ip dhcp pool CLIENTS
network 192.168.0.0 255.255.255.0
default-router 192.168.0.1
dns-server 192.168.0.1
domain-name 21RTM.local
!
ip dhcp pool MANAGEMENT
network 10.0.0.0 255.255.255.0
!
!
subscriber templating
!
!
multilink bundle-name authenticated
!
!
crypto pki trustpoint TP-self-signed-3510874038
enrollment selfsigned
subject-name cn=IOS-Self-Signed-Certificate-3510874038
revocation-check none
rsakeypair TP-self-signed-3510874038
!
!
crypto pki certificate chain TP-self-signed-3510874038
certificate self-signed 01
quit
!
!
license udi pid C1117-4P sn FGL2205927C
license boot level securityk9
!
diagnostic bootup level minimal
spanning-tree extend system-id
!
!
username xxxxxxx privilege 15 password 7 xxxxxxx
!
redundancy
mode none
!
!
controller VDSL 0/2/0
!
!
vlan internal allocation policy ascending
!
!
class-map type inspect match-any ALLOWED-PROTOCOLS
match protocol icmp
match protocol dns
match protocol http
!
policy-map type inspect INSIDE-TO-OUTSIDE-POLICY
class type inspect ALLOWED-PROTOCOLS
inspect
!
zone security INTERNET
zone security INSIDE
zone-pair security ZP-INSIDE-TO-OUTSIDE source INSIDE destination INTERNET
!
!
interface GigabitEthernet0/0/0
no ip address
shutdown
no negotiation auto
!
interface GigabitEthernet0/1/0
description CLIENT LAN
switchport access vlan 10
switchport mode access
!
interface GigabitEthernet0/1/1
shutdown
!
interface GigabitEthernet0/1/2
shutdown
!
interface GigabitEthernet0/1/3
description MANAGEMENT INTERFACE
switchport access vlan 100
switchport mode access
!
interface ATM0/2/0
no ip address
shutdown
no atm ilmi-keepalive
no atm enable-ilmi-trap
!
interface Ethernet0/2/0
mac-address xxxxxxxxx
no ip address
no negotiation auto
!
interface Ethernet0/2/0.101
description SUBINT TO INTERNET
encapsulation dot1Q 101
ip dhcp client request classless-static-route
ip dhcp client client-id hex xxxxxxxx
ip dhcp client hostname xxxxxxxx@skydsl|xxxxxxxx
ip address dhcp
no ip redirects
no ip proxy-arp
ip nat outside
zone-member security INTERNET
ip virtual-reassembly
!
interface Vlan1
no ip address
!
interface Vlan10
ip address 192.168.0.1 255.255.252.0
ip nat inside
zone-member security INSIDE
!
interface Vlan100
ip address 10.0.0.1 255.255.255.0
!
ip nat inside source route-map OUTSIDE-POOL interface Ethernet0/2/0.101 overload
ip forward-protocol nd
no ip http server
ip http authentication local
no ip http secure-server
ip dns server
ip ssh version 2
!
!
ip access-list extended NAT-TO-OUTSIDE
permit ip 192.168.0.0 0.0.3.255 any
!
!
!
route-map OUTSIDE-POOL permit 10
match ip address NAT-TO-OUTSIDE
match interface Ethernet0/2/0.101
!
!
!
control-plane
!
!
line con 0
password 7 075912435E010C164E
login
transport input all
stopbits 1
line vty 0 4
login local
transport input ssh
!
wsma agent exec
!
wsma agent config
!
wsma agent filesys
!
wsma agent notify
!
!
end
Solved! Go to Solution.
11-05-2018 12:21 PM - edited 11-05-2018 12:22 PM
Hi,
You need to tweak your ACL, as such....
ip access-list extended NACL-CLIENT-TO-INTERNET
permit icmp 192.168.0.0 0.0.0.255 any
permit tcp 192.168.0.0 0.0.0.255 any eq domain
permit udp 192.168.0.0 0.0.0.255 any eq domain
permit tcp 192.168.0.0 0.0.0.255 any eq www
permit tcp 192.168.0.0 0.0.0.255 any eq 443
permit udp 192.168.0.0 0.0.0.255 any eq ntp
This will allow any device on the source 192.168.0.0/24 network on any source port to access any ip address on the ports defined. You were previously allow traffic from only the source ports of 53, 80, 443, 123, which as you can see if your logs was dropped because the source tcp port is randomised e.g. - 192.168.0.32:59790
HTH
10-23-2018 05:06 AM
10-23-2018 06:20 AM
10-23-2018 06:53 AM
10-24-2018 10:20 AM
Hi Rob - thanks for that - it pointed me off to research the SELF zone - of which I was not aware.
I tried subsequently creating an IP ANY ANY deny ACL and applied it between the self and Internet zones as this is what I needed to achieve but I got no Packets going out of the router at all then weirdly. Everything was blocked. From what I've read you have to use the self zone - no getting around it.
Given my existing config would I be correct in assuming that one must configure rules to allow ALL traffic TO and FROM the self zone. Which takes care of INSIDE.
Then configure a further rule from SELF to INTERNET matching the protocols I choose to allow. This would then presumably place an implicit DENY rule on any inbound traffic from the Internet ? i.e. no match from the stateful inspection therefore DROP?
Finally - what about my existing Zones (inside-to-outside) - are these then deletable because the SELF rules have replaced them?
The way I see it (or imagine it) Simply:
CLIENTS----->INSIDE LAN I/F----->SELF ZONE----->OUTSIDE WAN I/F----->Internet
(Allow all Traffic) ----->SELF ZONE----->(Allow Filtered Traffic OUT)----->Internet
SELF ZONE<--/-x (Block all Filtered traffic IN)<-----Internet
Which replaces my existing config of INSIDE/OUTSIDE - it effectively puts another zone smack bang in the middle of my existing config. Correct ?
Many thanks for your help. Invaluable for those of us learning new Cisco technologies.
10-24-2018 10:42 AM
10-24-2018 11:08 AM
10-24-2018 01:01 PM
10-24-2018 02:13 PM
10-25-2018 02:29 AM
10-25-2018 02:57 AM
10-25-2018 04:10 AM
10-25-2018 04:17 AM
You cannot use "inspect" in self zone rules, only pass....this means the traffic is only permitted in one direction, so you'd need to permit that return traffic.
Reference here, search for "self" under the important points section for the informed I just provided above.
HTH
10-25-2018 04:24 AM
OK - that's weird then because in my config I definitely have a PM-SELF-INSIDE (and conversely INSIDE-SELF) with an INSPECT statement rather than PASS and it seems to not throw an error ?
Do these need changing to PASS also ?
10-25-2018 07:53 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide