Analog Broken Cable

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.