(1) Prohibit a host to ping:
First prepare two hosts:
At this point, first clear all iptables rules
and then add our rules: prohibit our 192.168.19.131 host from connecting to 192.168.19.129:
This is what we found unable to ping
We can see that a message has been received, num has become 1
ps: Modify the host name:
(2) Modify the rules.
At this point, we add another host: 192.168.19.134.
We will change the prohibition of 192.168.19.131 above to prohibit 192.168.19.134:
At this time, I use my 192.168.19.134 host to ping192 .168.19.129:
It is found that it cannot be pinged.
Then use 192.168.19.131 to ping: it is
found that it can be pinged.