networking - Iptable input icmp on interface - Ask Ubuntu
i'm trying accept incoming icmp
traffic 192.168.1.0/24
on interface eth0
.
here command
iptables -a input -s 192.168.1.0/24 -i eth0 icmp --icmp-type 8 -j accept
this command on file. when execute file /etc/file
error:
bad argument 'icmp'
any ideas?
you missing 2 points:
the
-p
(--protocol
) option name beforeicmp
--icmp-type 8
echo_request (type 8), not echo_response (type 0), need--icmp type 0
do:
iptables -a input -s 192.168.1.0/24 -i eth0 -p icmp --icmp-type 0 -j accept
Comments
Post a Comment