not responding to ping
Hello. I'm a relative n00b to linux security, so pardon me if this question seems dumb.
How can I prevent my computer from responding to pings? I assume I need to edit some iptables conf file or another in some way. I'm currently running Fedora Core 1 with the most recent kernel. More specifically, due to my broadband internet connection, I think I need to be able to respond to pings from my ISP, but I want to ignore all others. How can it be done? Please hold my hand on this one. Thanks. |
You can do that with this command:
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all That would block all ping responses. As for only response pings from your ISP, I think you will need iptables. |
Disabling all ping requests is easy (you should also add this to your startup scripts):
Code:
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all Code:
net.ipv4.icmp_echo_ignore_all = 1 To enable ping to only your ISP but deny it to everyone else, you'd have to use iptables and know what IP address(es) request ping. This example would allo ping from any address in the 10.0.0.0/255.255.255.0 subnet but deny it from everyone else. Code:
iptables -A INPUT -p icmp -s 10.0.0.0/24 -j ACCEPT |
serz beat me to it -- Do'h
|
Will editing sysctl.conf alone do it?
[edit: Apparently so...] Thanks again! |
All times are GMT -5. The time now is 06:08 PM. |