Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of viewing the access Traffic of Linux Network Card

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Install the iftop command (based on epel source) [root@node ~] # yum install-y iftop [root@node ~] # iftop-I eth0 # to view the amount of access traffic for an IP After entering, you can press T key to observe the total traffic of IP [root@node] # iptables-I INPUT-p tcp-s 192.168.81-- dport 80-j DROP # to block [root@node] # iptables-I INPUT-p tcp-s 192.168.81-- dport 443-j DROP [root@node] # iptables-vnLChain INPUT (policy ACCEPT 6 packets 428 bytes) pkts bytes target prot opt in out source destination 0 DROP tcp-- * * 192.168.81 0.0.0.0 DROP tcp-- * * 192.168.8.81 0.0.0. 0 tcp dpt:80 [root@node ~] # iptables-save > / etc/sysconfig/iptables [root@node ~] # vim / etc/rc.localiptables-restore < / etc/sysconfig/iptables [root@node ~] # chmod aplyx / etc/rc.local# Delete iptables rules [root@node ~] # iptables- D INPUT-p tcp-s 192.168.81-dport 80-j DROP # Delete iptables rules

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report