Cisco Systems set srcIP for ICMP replies, or for locally sourced connections?

Bookmark this page:  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
set srcIP for ICMP replies, or for locally sourced connections? Phil Begriffenfeldt 03-27-08
Posted by Phil Begriffenfeldt on March 27, 2008, 12:29 pm
Please log in for more thread options
I'd like to block traffic to my routers from outside my network; but
still to allow my routers to traceroute/ping to hosts outside my
network; and reply to traceroutes sourced outside the network.

Is there a way to force ICMP replies to come from a particular IP
address? For example, something like "ip icmp source-interface
loopback2", where the ICMP messages generated by my routers would come
from a source IP that I can specify? That would help to hide interface
IPs from casual miscreants.

Alternatively, I could try to block all packets entering my network with
destination IPs of my internal links. But that would block replies from
simple outbound pings and traceroutes from router CLI sessions. If
there were a way to bind locally-sourced ping and traceroute to a
particular source IP on each router, then that would also be helpful.

Perhaps blocking at the network edge is not productive, and I should be
using Control Plane Policing for this? Router platform is mix of VXR
and 3BXL.

Posted by News Reader on March 27, 2008, 2:05 pm
Please log in for more thread options
Attach an ACL to the WAN interface (direction "in") that specifies to
which IP addresses (interfaces) you will permit ICMP.

The direction is specified by the keyword "in", in the following example:

ip access-group <acl-name> in

For security reasons, you should actually specify the "types" of ICMP
you wish to permit (e.g.: echo-reply, time-exceeded, unreachable,
administratively-prohibited, packet-too-big, source-quench,
parameter-problem). Some types of ICMP should definitely be denied.

Other info of interest:

Extended ping (via the CLI) permits you to specify the source IP address
that will be used in the outbound ping, which then becomes the
destination IP address in the reply packet.

"Inspection" applied on a LAN interface will open temporary dynamic
holes in the return path ACLs to accommodate replies to pings sent from
internal hosts.


Best Regards,
News Reader


Phil Begriffenfeldt wrote:
> I'd like to block traffic to my routers from outside my network; but
> still to allow my routers to traceroute/ping to hosts outside my
> network; and reply to traceroutes sourced outside the network.
>
> Is there a way to force ICMP replies to come from a particular IP
> address? For example, something like "ip icmp source-interface
> loopback2", where the ICMP messages generated by my routers would come
> from a source IP that I can specify? That would help to hide interface
> IPs from casual miscreants.
>
> Alternatively, I could try to block all packets entering my network with
> destination IPs of my internal links. But that would block replies from
> simple outbound pings and traceroutes from router CLI sessions. If
> there were a way to bind locally-sourced ping and traceroute to a
> particular source IP on each router, then that would also be helpful.
>
> Perhaps blocking at the network edge is not productive, and I should be
> using Control Plane Policing for this? Router platform is mix of VXR
> and 3BXL.

Posted by Thrill5 on March 27, 2008, 9:31 pm
Please log in for more thread options
Traceroute doesn't use ICMP, it sends udp packets on port 16667 (usually),
increasing the TTL by one. The router that gets the packet with a TTL of 1
will reply with an ICMP TTL exceeded message.


> Attach an ACL to the WAN interface (direction "in") that specifies to
> which IP addresses (interfaces) you will permit ICMP.
>
> The direction is specified by the keyword "in", in the following example:
>
> ip access-group <acl-name> in
>
> For security reasons, you should actually specify the "types" of ICMP you
> wish to permit (e.g.: echo-reply, time-exceeded, unreachable,
> administratively-prohibited, packet-too-big, source-quench,
> parameter-problem). Some types of ICMP should definitely be denied.
>
> Other info of interest:
>
> Extended ping (via the CLI) permits you to specify the source IP address
> that will be used in the outbound ping, which then becomes the destination
> IP address in the reply packet.
>
> "Inspection" applied on a LAN interface will open temporary dynamic holes
> in the return path ACLs to accommodate replies to pings sent from internal
> hosts.
>
>
> Best Regards,
> News Reader
>
>
> Phil Begriffenfeldt wrote:
>> I'd like to block traffic to my routers from outside my network; but
>> still to allow my routers to traceroute/ping to hosts outside my network;
>> and reply to traceroutes sourced outside the network.
>>
>> Is there a way to force ICMP replies to come from a particular IP
>> address? For example, something like "ip icmp source-interface
>> loopback2", where the ICMP messages generated by my routers would come
>> from a source IP that I can specify? That would help to hide interface
>> IPs from casual miscreants.
>>
>> Alternatively, I could try to block all packets entering my network with
>> destination IPs of my internal links. But that would block replies from
>> simple outbound pings and traceroutes from router CLI sessions. If there
>> were a way to bind locally-sourced ping and traceroute to a particular
>> source IP on each router, then that would also be helpful.
>>
>> Perhaps blocking at the network edge is not productive, and I should be
>> using Control Plane Policing for this? Router platform is mix of VXR and
>> 3BXL.



Posted by News Reader on March 28, 2008, 12:43 am
Please log in for more thread options
Beg to differ.

It's system dependent.

I just performed a traceroute from a Windows XP host through my IPSec+
GRE VPN, and captured it with Wireshark to confirm my beliefs.

A Windows XP (and probably other Windows paltforms) uses ICMP for
traceroute.

Best Regards,
News Reader

Thrill5 wrote:
> Traceroute doesn't use ICMP, it sends udp packets on port 16667 (usually),
> increasing the TTL by one. The router that gets the packet with a TTL of 1
> will reply with an ICMP TTL exceeded message.
>
>
>> Attach an ACL to the WAN interface (direction "in") that specifies to
>> which IP addresses (interfaces) you will permit ICMP.
>>
>> The direction is specified by the keyword "in", in the following example:
>>
>> ip access-group <acl-name> in
>>
>> For security reasons, you should actually specify the "types" of ICMP you
>> wish to permit (e.g.: echo-reply, time-exceeded, unreachable,
>> administratively-prohibited, packet-too-big, source-quench,
>> parameter-problem). Some types of ICMP should definitely be denied.
>>
>> Other info of interest:
>>
>> Extended ping (via the CLI) permits you to specify the source IP address
>> that will be used in the outbound ping, which then becomes the destination
>> IP address in the reply packet.
>>
>> "Inspection" applied on a LAN interface will open temporary dynamic holes
>> in the return path ACLs to accommodate replies to pings sent from internal
>> hosts.
>>
>>
>> Best Regards,
>> News Reader
>>
>>
>> Phil Begriffenfeldt wrote:
>>> I'd like to block traffic to my routers from outside my network; but
>>> still to allow my routers to traceroute/ping to hosts outside my network;
>>> and reply to traceroutes sourced outside the network.
>>>
>>> Is there a way to force ICMP replies to come from a particular IP
>>> address? For example, something like "ip icmp source-interface
>>> loopback2", where the ICMP messages generated by my routers would come
>>> from a source IP that I can specify? That would help to hide interface
>>> IPs from casual miscreants.
>>>
>>> Alternatively, I could try to block all packets entering my network with
>>> destination IPs of my internal links. But that would block replies from
>>> simple outbound pings and traceroutes from router CLI sessions. If there
>>> were a way to bind locally-sourced ping and traceroute to a particular
>>> source IP on each router, then that would also be helpful.
>>>
>>> Perhaps blocking at the network edge is not productive, and I should be
>>> using Control Plane Policing for this? Router platform is mix of VXR and
>>> 3BXL.
>
>

Posted by Barry Margolin on March 28, 2008, 10:34 pm
Please log in for more thread options

> Beg to differ.
>
> It's system dependent.
>
> I just performed a traceroute from a Windows XP host through my IPSec+
> GRE VPN, and captured it with Wireshark to confirm my beliefs.
>
> A Windows XP (and probably other Windows paltforms) uses ICMP for
> traceroute.

He said he wants to "allow my routers to traceroute/ping to hosts". He
didn't say anything about allowing Windows to TRACERT. So Windows's
behavior is not relevant, only Cisco's.

>
> Best Regards,
> News Reader
>
> Thrill5 wrote:
> > Traceroute doesn't use ICMP, it sends udp packets on port 16667 (usually),
> > increasing the TTL by one. The router that gets the packet with a TTL of 1
> > will reply with an ICMP TTL exceeded message.
> >
> >
> >> Attach an ACL to the WAN interface (direction "in") that specifies to
> >> which IP addresses (interfaces) you will permit ICMP.
> >>
> >> The direction is specified by the keyword "in", in the following example:
> >>
> >> ip access-group <acl-name> in
> >>
> >> For security reasons, you should actually specify the "types" of ICMP you
> >> wish to permit (e.g.: echo-reply, time-exceeded, unreachable,
> >> administratively-prohibited, packet-too-big, source-quench,
> >> parameter-problem). Some types of ICMP should definitely be denied.
> >>
> >> Other info of interest:
> >>
> >> Extended ping (via the CLI) permits you to specify the source IP address
> >> that will be used in the outbound ping, which then becomes the destination
> >> IP address in the reply packet.
> >>
> >> "Inspection" applied on a LAN interface will open temporary dynamic holes
> >> in the return path ACLs to accommodate replies to pings sent from internal
> >> hosts.
> >>
> >>
> >> Best Regards,
> >> News Reader
> >>
> >>
> >> Phil Begriffenfeldt wrote:
> >>> I'd like to block traffic to my routers from outside my network; but
> >>> still to allow my routers to traceroute/ping to hosts outside my network;
> >>> and reply to traceroutes sourced outside the network.
> >>>
> >>> Is there a way to force ICMP replies to come from a particular IP
> >>> address? For example, something like "ip icmp source-interface
> >>> loopback2", where the ICMP messages generated by my routers would come
> >>> from a source IP that I can specify? That would help to hide interface
> >>> IPs from casual miscreants.
> >>>
> >>> Alternatively, I could try to block all packets entering my network with
> >>> destination IPs of my internal links. But that would block replies from
> >>> simple outbound pings and traceroutes from router CLI sessions. If there
> >>> were a way to bind locally-sourced ping and traceroute to a particular
> >>> source IP on each router, then that would also be helpful.
> >>>
> >>> Perhaps blocking at the network edge is not productive, and I should be
> >>> using Control Plane Policing for this? Router platform is mix of VXR and
> >>> 3BXL.
> >
> >

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE don't copy me on replies, I'll read them in the group ***

Similar ThreadsPosted
set srcIP for ICMP replies, or for locally sourced connections? March 27, 2008, 12:29 pm
PIX - Disable Ping / ICMP replies from outside interface July 20, 2005, 7:51 pm
Pings and PIX messages 302020: Built ICMP - 302021: Teardown ICMP Lots of them.... May 1, 2006, 2:40 pm
CSM command similar to CSS sticky-srcip-dstport February 15, 2007, 5:31 pm
Need code for enabling ping replies February 22, 2007, 1:34 pm
PIX - Moving Subnet behind VPN from Locally Connected... May 1, 2006, 7:56 pm
MQC based QOS and locally generated packets October 4, 2007, 9:19 pm
Question about locally define user privilege levels on IOS devices? August 7, 2008, 9:00 am
IP SLA - ICMP June 5, 2008, 3:55 am
icmp weirdness - PIX 501 (does any really mean any??) September 23, 2005, 10:12 am
timestamp ICMP ? April 16, 2006, 11:45 pm
ICMP pinging. October 3, 2006, 7:22 am
PIX 501 - allow icmp out but deny everything else out November 18, 2006, 1:49 am
PIX 6.3.4 - I have question on a VPN setup & ICMP August 26, 2005, 11:08 am
PIX7.x/ASA and icmp redirects April 19, 2006, 12:30 am