Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Allow ICMP to certain destinations only

Status
Not open for further replies.

MichealC4

Programmer
Jun 26, 2003
457
After 4 weeks of talking with Microsoft trying to figure out why our clients behind a NAT with PAT overflow are trying to ping the heck out of our public domain controllers, they have come to the conclusion that it is because ICMP is disabled on the firewall. We have ICMP disabled on the firewall for security reasons and would really rather it not be enabled again. So, is it possible to allow ICMP only to a certain subnet (actually, need it to go to several subnets)? It has been a while since I've touched the FOS, so I'm a bit rusty. 515E and 506

----------------------------
"Will work for bandwidth" - Thinkgeek T-shirt
 
Can you confirm, is this clients behind your pix pinging remote subnets or allowing remote subnets to pix your public servers?

Chris.

**********************
Chris A.C, CCNA, CCSA
**********************
 
Yes, you can control ICMP just like other protocols.

access-list xxx permit icmp any any eq echo-reply
access-list xxx permit icmp 192.168.0.0 255.255.255.0 192.168.2.0 255.255.255.0 eq echo

... etc.
 
Can you confirm, is this clients behind your pix pinging remote subnets or allowing remote subnets to pix your public servers?
This is clients behind the pix trying to ping our and only our public subnets. Remote subnets are able (well, within reason, as our IPS blocks it if it gets excessive) to ping our public servers.

lgarner: Thanks! I will give that a try.

----------------------------
"Will work for bandwidth" - Thinkgeek T-shirt
 
I tried your above, lgarner, but the PIX threw errors saying ip address invalid at eq. I did some more searching and got the PIX to accept this, but pings still didn't work:

access-list acl_inside permit icmp any any echo-reply
access-list acl_inside permit icmp any host <public IP> echo
access-list acl_inside permit icmp any host <public IP2> echo
access-list acl_inside permit icmp any host <public IP3> echo

access-list acl_outside permit icmp any any echo-reply
access-list acl_outside permit icmp any host <public IP> echo
access-list acl_outside permit icmp any host <public IP2> echo
access-list acl_outside permit icmp any host <public IP3> echo

----
Here's my firewall config (with certain sections edited of course)

I'm not responsible for setting this up. :p

Code:
PIX Version 6.3(3)
interface ethernet0 100full
interface ethernet1 100full
nameif ethernet0 outside security0
nameif ethernet1 inside security100
enable password <password>
passwd <password>
hostname pixfirewall
domain-name ciscopix.com
fixup protocol dns maximum-length 512
fixup protocol ftp 21
fixup protocol h323 h225 1720
fixup protocol h323 ras 1718-1719
fixup protocol http 80
fixup protocol rsh 514
fixup protocol rtsp 554
fixup protocol sip 5060
fixup protocol sip udp 5060
fixup protocol skinny 2000
fixup protocol smtp 25
fixup protocol sqlnet 1521
fixup protocol tftp 69
names
access-list acl_inside permit tcp any any
access-list acl_inside permit udp any any
access-list acl_outside permit tcp any any
access-list acl_outside permit udp any any
pager lines 24
mtu outside 1500
mtu inside 1500
ip address outside <public pat> 255.255.255.0
ip address inside <inside range> 255.255.255.0
ip audit info action alarm
ip audit attack action alarm
failover
failover timeout 0:00:00
failover poll 15
failover ip address outside <public IP>
failover ip address inside <inside IP>
pdm logging informational 100
pdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 1 0.0.0.0 0.0.0.0 0 0
access-group acl_outside in interface outside
access-group acl_inside in interface inside
rip outside passive version 2
route outside 0.0.0.0 0.0.0.0 0.0.0.0 1
timeout xlate 0:05:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h225 1:00:00
timeout h323 0:05:00 mgcp 0:05:00 sip 0:30:00 sip_media 0:02:00
timeout uauth 0:05:00 absolute
aaa-server TACACS+ protocol tacacs+
aaa-server RADIUS protocol radius
aaa-server LOCAL protocol local
url-server (outside) vendor websense host 0.0.0.0 timeout 5 protocol TCP version 1
url-cache dst 128KB
filter url http 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0
filter url 8080-8099 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0
http server enable
http <inside address> 255.255.255.0 inside
no snmp-server location
no snmp-server contact
snmp-server community public
no snmp-server enable traps
floodguard enable
telnet timeout 5
ssh timeout 5
console timeout 0
dhcpd address <inside range> inside
dhcpd lease 3600
dhcpd ping_timeout 750
dhcpd auto_config outside
dhcprelay server <inside dhcp server> inside
url-block url-mempool 2500
url-block url-size 4
terminal width 80

----------------------------
"Will work for bandwidth" - Thinkgeek T-shirt
 
Hi,

try this instead

access-list acl_inside permit icmp any any eq echo-reply
access-list acl_inside permit icmp any host <public IP> eq echo-reply
access-list acl_inside permit icmp any host <public IP2> eq echo-reply
access-list acl_inside permit icmp any host <public IP3> eq echo-reply

access-list acl_outside permit icmp any any eq echo-reply
access-list acl_outside permit icmp any host <public IP> eq echo-reply
access-list acl_outside permit icmp any host <public IP2> eq echo-reply
access-list acl_outside permit icmp any host <public IP3> eq echo-reply

You've forgotten " EQ "

Julian Dragut

PS: I guess the acl's you have setup are only for config and debugging purpose !

Julian Dragut
 
Thanks, I'll give that a try.

And no, the existing acl's are production. :( :( :(

----------------------------
"Will work for bandwidth" - Thinkgeek T-shirt
 
Those echo-reply with the public IP, should they be echo?

----------------------------
"Will work for bandwidth" - Thinkgeek T-shirt
 
acl_inside should allow "echo" from the inside to the public hosts:

access-list acl_inside permit icmp any host <host1> echo
.. etc.

acl_outside should allow "echo-reply" from the public host to the inside:

access-list acl_outside permit icmp host <host1> any echo-reply

The ACLs for the public hosts will never be evaluated if there's a "permit icmp any any" preceding them.

Check for additional information on pings and pixes.
 
Okay, I got it to work, finally.

I had to leave out the eq for it to work properly. Right now, I have it as allowing each server it needs, which is a royal pain. Is there a way to allow subnets instead? Kinda nasty that way as it opens up the entire subnet, but maintainence wise it is much easier.

----------------------------
"Will work for bandwidth" - Thinkgeek T-shirt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top