Portál AbcLinuxu, 24. října 2025 11:10
iptables -I OUTPUT -p tcp -m tcp --dport 22 -j ACCEPTvygenerovat provoz (odchozí, tj. podle přání a smyslu pravidla) a pak "iptables -nvL".
# iptables -nvL ... Chain OUTPUT (policy ACCEPT 15 packets, 1438 bytes) pkts bytes target prot opt in out source destination 19 4185 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22Pokud není odpovědí to, co jste chtěl, ptejte se, prosím, lépe.
# tcpdump -i eth0 tcp port 22022 -s 64 -w preferred.pcapMělo by to pobrat vše co běhá "skrze" port 22022, jen prvních 64 bajtů. A prozkoumáte to třeba v tom wiresharku, pamatuju, že byly i nějaké "reportery", co vypsaly to samé, co wireshark / statistics / conversations.
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.14 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::fe15:b4ff:fe03:e8a6 prefixlen 64 scopeid 0x20<link>
ether fc:15:b4:03:e8:a6 txqueuelen 1000 (Ethernet)
RX packets 5183598 bytes 6549814176 (6.0 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2966065 bytes 273032725 (260.3 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.14 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::fe15:b4ff:fe03:e8a6 prefixlen 64 scopeid 0x20<link>
ether fc:15:b4:03:e8:a6 txqueuelen 1000 (Ethernet)
RX packets 5183598 bytes 6549814176 (6.0 GiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2966065 bytes 273032725 (260.3 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
$ ip -s li sh dev eth0
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br0 state UP mode DEFAULT group default qlen 1000
link/ether 50:e5:49:3e:d6:25 brd ff:ff:ff:ff:ff:ff
RX: bytes packets errors dropped overrun mcast
21256789780 19179029 0 4315 0 166009
TX: bytes packets errors dropped carrier collsns
14816054700 18158304 0 0 0 0
A hele, ty RX dropnutý ... zase něco novýho, ethernet sám o sobě si nestěžuje ... # ethtool -S eth0
NIC statistics:
tx_packets: 503783
rx_packets: 1254179
tx_errors: 0
rx_errors: 0
rx_missed: 0
align_errors: 0
tx_single_collisions: 0
tx_multi_collisions: 0
unicast: 1196247
broadcast: 7621
multicast: 57932
tx_aborted: 0
tx_underrun: 0
ip -s li
cat /sys/class/net/eth0/statistics/?x_bytes
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.