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 before icmp

  • --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

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User