文章摘要
这篇文章简要介绍了使用`iptables`命令查看网络过滤器日志的内容。`iptables`是一种常用的网络过滤器管理工具,常用于配置防火墙和流量控制。文章展示了`iptables`日志输出的结构,包括输入链路(`INPUT`)、前向链路(`FORWARD`)和输出链路(`OUTPUT`)的流量情况,分别显示了接收和发送的数据量(`num pkts`和`bytes`)。此外,文章还提到`iptables`命令的语法,如`iptables -L -n -v --line-number`,用于详细查看过滤规则。通过对这篇文章的阅读,可以了解如何通过`iptables`配置和监控网络流量。
[root@jxl-1 ~]# iptables -L -n -v –line-number
Chain INPUT (policy ACCEPT 2033 packets, 2002K bytes)
num pkts bytes target prot opt in out source destination
1 0 0 DROP icmp — * * 0.0.0.0/0 0.0.0.0/0 source IP range 192.168.20.10-192.168.20.19
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 2072 packets, 3079K bytes)
num pkts bytes target prot opt in out source destination
Chain INPUT (policy ACCEPT 2033 packets, 2002K bytes)
num pkts bytes target prot opt in out source destination
1 0 0 DROP icmp — * * 0.0.0.0/0 0.0.0.0/0 source IP range 192.168.20.10-192.168.20.19
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 2072 packets, 3079K bytes)
num pkts bytes target prot opt in out source destination
© 版权声明
文章版权归作者所有,未经允许请勿转载。



