[Nottingham] How to enable echo (for ping)
Martin
nottingham at mailman.lug.org.uk
Wed Jul 30 19:59:00 2003
Martin wrote:
> James Beckett wrote:
>
[...]
>> The echo service will echo back a TCP stream
>> you send to it, eg with
>> telnet localhost echo
>> More than likely, you don't need it enabled.
>
> Beautifully obscure! I'll have a brief play before disabling it...
>
[...]
>> Can you telnet localhost?
>> telnet localhost 80? etc
Telnet now installed (:-))
And:
# telnet localhost 80
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
... But then that is probably iptables rightly doing its stuff.
"Now to move right along..." (Very famous quote (:-))
[...]
>> In /etc/sysctl.conf do you have a line like
>> net.ipv4.icmp_echo_ignore=1 ?
>
>
> Got one better than that!
>
> How about:
> net.ipv4.icmp_echo_ignore_all=1
>
> (:-))
>
> Now for a few more tweaks, including
> net.ipv4.icmp_echo_ignore_all=0
# vim sysctl.conf
# sysctl -p
# ping localhost
PING localhost (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost (127.0.0.1): icmp_seq=1 ttl=64 time=0.071 ms
64 bytes from localhost (127.0.0.1): icmp_seq=2 ttl=64 time=0.087 ms
64 bytes from localhost (127.0.0.1): icmp_seq=3 ttl=64 time=0.068 ms
64 bytes from localhost (127.0.0.1): icmp_seq=4 ttl=64 time=0.090 ms
64 bytes from localhost (127.0.0.1): icmp_seq=5 ttl=64 time=0.097 ms
64 bytes from localhost (127.0.0.1): icmp_seq=6 ttl=64 time=0.091 ms
64 bytes from localhost (127.0.0.1): icmp_seq=7 ttl=64 time=0.090 ms
64 bytes from localhost (127.0.0.1): icmp_seq=8 ttl=64 time=0.073 ms
64 bytes from localhost (127.0.0.1): icmp_seq=9 ttl=64 time=0.066 ms
64 bytes from localhost (127.0.0.1): icmp_seq=10 ttl=64 time=0.099 ms
--- localhost ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9027ms
rtt min/avg/max/mdev = 0.066/0.083/0.099/0.013 ms
All good stuff!
Now I just need to find what bit of script rewrites sysctl.conf undoing
my net.ipv4.icmp_echo_ignore_all=0 fix...
> Many thanks!
>
> Martin
> (And where in manuals is there a pointer to that!)
--
----------------
Martin Lomas
martin@ml1.co.uk
----------------