Iptables - как посмотреть список пакетов и счетчик трафика - Traffic Accounting: различия между версиями
Материал из Wiki - Iphoster - the best ever hosting and support. 2005 - 2024
Admin iph (обсуждение | вклад) (Новая страница: «=== Iptables - как посмотреть список пакетов и счетчик трафика - Traffic Accounting === Использовать опц...») |
Admin iph (обсуждение | вклад) |
||
Строка 2: | Строка 2: | ||
− | Использовать опцию | + | Использовать опцию для iptables: |
− | -v | + | -v (lists the packet and byte count) |
а именно команда | а именно команда | ||
Строка 14: | Строка 14: | ||
-v lists the packet and byte count. | -v lists the packet and byte count. | ||
-x displays the byte count (otherwise it gets abbreviated to 200K, 3M, etc). | -x displays the byte count (otherwise it gets abbreviated to 200K, 3M, etc). | ||
+ | |||
+ | |||
+ | Пример вывода iptables: | ||
+ | # iptables -L -n -v | ||
+ | Chain INPUT (policy ACCEPT 47059 packets, 31M bytes) | ||
+ | pkts bytes target prot opt in out source destination | ||
+ | 1382 66620 DROP all -- * * 103.13.210.183 0.0.0.0/0 | ||
+ | 49 2548 DROP all -- * * 43.153.4.222 0.0.0.0/0 | ||
+ | 49 2548 DROP all -- * * 43.157.10.240 0.0.0.0/0 | ||
+ | 52 2704 DROP all -- * * 43.130.201.132 0.0.0.0/0 | ||
+ | 799 47580 DROP all -- * * 62.210.124.146 0.0.0.0/0 | ||
+ | 718M 432G cphulk all -- * * 0.0.0.0/0 0.0.0.0/0 | ||
+ | 31M 1869M DROP all -- * * 194.87.14.0/24 0.0.0.0/0 |
Текущая версия на 09:47, 9 октября 2023
Iptables - как посмотреть список пакетов и счетчик трафика - Traffic Accounting
Использовать опцию для iptables:
-v (lists the packet and byte count)
а именно команда
# iptables -L -n -v
Расшифровка опций iptables:
-L lists all the rules. -n does not resolve the ip addresses. -v lists the packet and byte count. -x displays the byte count (otherwise it gets abbreviated to 200K, 3M, etc).
Пример вывода iptables:
# iptables -L -n -v Chain INPUT (policy ACCEPT 47059 packets, 31M bytes) pkts bytes target prot opt in out source destination 1382 66620 DROP all -- * * 103.13.210.183 0.0.0.0/0 49 2548 DROP all -- * * 43.153.4.222 0.0.0.0/0 49 2548 DROP all -- * * 43.157.10.240 0.0.0.0/0 52 2704 DROP all -- * * 43.130.201.132 0.0.0.0/0 799 47580 DROP all -- * * 62.210.124.146 0.0.0.0/0 718M 432G cphulk all -- * * 0.0.0.0/0 0.0.0.0/0 31M 1869M DROP all -- * * 194.87.14.0/24 0.0.0.0/0