08-18-2008 05:07 PM - edited 03-06-2019 12:52 AM
Hi,
I would like to know what are the port numbers for echo and echo reply ?
I have checked this on the iana website and it only says the following :-
> echo 7/tcp Echo
> echo 7/udp Echo
With this I presume that the echo and echo-reply are using port 7 ?
The reason for this question is that I am writing an ACL and would like to know the ports for echo and echo reply? I guess the best way to do this is to put both tcp and udp in the ACL ....
Pls advice,
- InternetB -
08-18-2008 05:50 PM
InternetB
I wonder if the question that you ask really represents what you want to know. I wonder if what you really want to know is how to permit (or perhaps deny) ping (which uses echo-request and echo-reply).
If that is what you really want to know then the answer is that ping uses ICMP and not UDP or TCP. Within ICMP there is a message type for echo-request and a message type for echo-reply. So if you want to have an access list statement for ping it might look something like this:
ip access-list 101 permit icmp any any eq echo-request
ip access-list 101 permit icmp any any eq echo-reply
There are packet types within TCP and UDP for echo and if that is what you are interested in then that is what you should permit.
HTH
Rick
08-18-2008 07:09 PM
Hi Rick,
Thank you for the post. Alright I am getting it. It looks like there are no ports defined for icmp from the iana url. I know some ping utilities do use tcp/udp.
So it looks like there are no ports defined for icmp right ? The reason for this is that I need to understand this to define my firewall rule set.
Thank you sir,
Cheers,
- InternetB -
08-18-2008 07:19 PM
ICMP does not use ports in the way TCP/UDP does. Instead it uses types and codes. Attached is a link for ICMPv4 types and codes. Many stateful firewalls will allow you to use the type/code in their rulesets.
http://www.spirit.com/Resources/icmp.html
Jon
08-18-2008 08:30 PM
Thanks Jon. This is useful information .... :)
Cheers mate,
- InternetB -
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