Last Login:fri Jan 03:53:09 from 192.168.5.120
[Email protected] ~]#
[Email protected] ~]#
[Email protected] ~]#
[Email protected] ~]#
[Email protected] ~]# Clear
[Email protected] ~]# iptables--list
Chain INPUT (Policy ACCEPT)
Target Prot opt source destination
Chain FORWARD (Policy ACCEPT)
Target Prot opt source destination
Chain OUTPUT (Policy ACCEPT)
Target Prot opt source destination
[[email protected] ~]# Ping 192.168.5.120
PING 192.168.5.120 (192.168.5.120) bytes of data.
Bytes from 192.168.5.120:icmp_seq=1 ttl=64 time=0.267 ms
Bytes from 192.168.5.120:icmp_seq=2 ttl=64 time=0.333 ms
Bytes from 192.168.5.120:icmp_seq=3 ttl=64 time=0.265 ms
^c
---192.168.5.120 ping statistics---
3 Packets transmitted, 3 received, 0% packet loss, time 2259ms
RTT Min/avg/max/mdev = 0.265/0.288/0.333/0.034 ms
Disable IP
Note: parameter -i insert (add), -d delete (delete). followed by the rules, input means inbound, ***.***.***.*** to be blocked. ip drop means to discard the connection pass the -s Specify the source address to restrict.
[Email protected] ~]# iptables-i input-s 192.168.5.120-j DROP
[Email protected] ~]# iptables--list
Chain INPUT (Policy ACCEPT)
Target Prot opt source destination
DROP All--192.168.5.120 anywhere
Chain FORWARD (Policy ACCEPT)
Target Prot opt source destination
Chain OUTPUT (Policy ACCEPT)
Target Prot opt source destination
[[email protected] ~]# Ping 192.168.5.120
PING 192.168.5.120 (192.168.5.120) bytes of data.
^c
---192.168.5.120 ping statistics---
Packets transmitted, 0 received, 100% packet loss, time 114008ms
Recover IP
[Email protected] ~]# iptables-d input-s 192.168.5.120-j DROP
[Email protected] ~]# iptables--list
Chain INPUT (Policy ACCEPT)
Target Prot opt source destination
Chain FORWARD (Policy ACCEPT)
Target Prot opt source destination
Chain OUTPUT (Policy ACCEPT)
Target Prot opt source destination
[[email protected] ~]# Ping 192.168.5.120
PING 192.168.5.120 (192.168.5.120) bytes of data.
Bytes from 192.168.5.120:icmp_seq=1 ttl=64 time=0.288 ms
Bytes from 192.168.5.120:icmp_seq=2 ttl=64 time=0.276 ms
Bytes from 192.168.5.120:icmp_seq=3 ttl=64 time=0.256 ms
^c
---192.168.5.120 ping statistics---
3 Packets transmitted, 3 received, 0% packet loss, time 2389ms
RTT Min/avg/max/mdev = 0.256/0.273/0.288/0.018 ms
[Email protected] ~]#
Analog Broken Cable