What's new

IPtable rule for PING

PuraVida

New Around Here
I need to allow ping from the WAN interface but from only a specific address. That's not an option in the web GUI so in an SSH terminal I entered the rules below (with correct IP address) but was still able to ping from any address. Are these rules correct, or am I missing something, or is this even possible? This on 3006.102.4 on an Asus RT-BE92U.

iptables -A INPUT -p icmp -j DROP
iptables -A INPUT -s 192.168.1.10 -p icmp -j ACCEPT
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
 
I would try something like this:
Code:
iptables -I INPUT_PING -s 192.168.1.10/32 -j ACCEPT
This accept pings from that source IP using the existing chain the firmware creates to drop pings.

Your rules were being appended to the end of the INPUT chain, where they were probably never evaluated.
 
I would try something like this:
Code:
iptables -I INPUT_PING -s 192.168.1.10/32 -j ACCEPT
This accept pings from that source IP using the existing chain the firmware creates to drop pings.

Your rules were being appended to the end of the INPUT chain, where they were probably never evaluated.
Thanks. That makes perfect sense.
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Back
Top