Народ, подскажите, в iptables зарезал весь трафик , кроме определенных портов:
sudo iptables -L -v -n --line-numbers
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
1 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 12
2 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 11
3 0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 4
4 40 3475 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 3
5 2 100 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
6 205 16433 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
7 0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80
8 0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443
9 105 11550 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
10 26 2424 ACCEPT udp -- * * 192.168.1.0/24 0.0.0.0/0 udp dpt:137
11 10 2176 ACCEPT udp -- * * 192.168.1.0/24 0.0.0.0/0 udp dpt:138
12 0 0 ACCEPT tcp -- * * 192.168.1.0/24 0.0.0.0/0 state NEW tcp dpt:139
13 1 52 ACCEPT tcp -- * * 192.168.1.0/24 0.0.0.0/0 state NEW tcp dpt:445
14 0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpts:56881:56889
15 60 14653 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpts:56881:56889
16 0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:58846
17 137 31524 DROP all -- * * 0.0.0.0/0 0.0.0.0/0
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
num pkts bytes target prot opt in out source destination
Chain OUTPUT (policy ACCEPT 544 packets, 85231 bytes)
num pkts bytes target prot opt in out source destination
1 26 3172 ACCEPT all -- * lo 0.0.0.0/0 0.0.0.0/0
2 0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:80 state NEW
3 0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:443 state NEW
4 0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:53 state NEW
5 19 1278 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:53 state NEW
Но, tcpdump выдает:
sudo tcpdump -i eth0 port not 22 and host 192.168.1.2
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0, link-type EN10MB (Ethernet), capture size 262144 bytes
10:55:38.423548 IP rpi2.http > DESKTOP-1AFPVU5.64262: Flags [F.], seq 2656156146, ack 169506830, win 245, length 0
10:55:38.424777 IP DESKTOP-1AFPVU5.64262 > rpi2.http: Flags [.], ack 1, win 252, length 0
10:55:40.186098 IP DESKTOP-1AFPVU5.53749 > 239.255.255.250.1900: UDP, length 174
10:55:41.186306 IP DESKTOP-1AFPVU5.53749 > 239.255.255.250.1900: UDP, length 174
10:55:42.186230 IP DESKTOP-1AFPVU5.53749 > 239.255.255.250.1900: UDP, length 174
10:55:43.186281 IP DESKTOP-1AFPVU5.53749 > 239.255.255.250.1900: UDP, length 174
10:56:07.602361 IP DESKTOP-1AFPVU5.64262 > rpi2.http: Flags [F.], seq 1, ack 1, win 252, length 0
10:56:07.602862 IP rpi2.http > DESKTOP-1AFPVU5.64262: Flags [.], ack 2, win 245, length 0
10:56:12.456646 ARP, Request who-has rpi2 (b8:27:eb:39:43:ef (oui Unknown)) tell DESKTOP-1AFPVU5, length 46
10:56:12.457023 ARP, Reply rpi2 is-at b8:27:eb:39:43:ef (oui Unknown), length 28
10:57:38.670914 IP DESKTOP-1AFPVU5.netbios-dgm > 192.168.1.255.netbios-dgm: NBT UDP PACKET(138)
10:57:40.184160 IP DESKTOP-1AFPVU5.53423 > 239.255.255.250.1900: UDP, length 174
10:57:41.184112 IP DESKTOP-1AFPVU5.53423 > 239.255.255.250.1900: UDP, length 174
10:57:42.184649 IP DESKTOP-1AFPVU5.53423 > 239.255.255.250.1900: UDP, length 174
10:57:43.184154 IP DESKTOP-1AFPVU5.53423 > 239.255.255.250.1900: UDP, length 174
10:57:43.453668 ARP, Request who-has rpi2 (b8:27:eb:39:43:ef (oui Unknown)) tell DESKTOP-1AFPVU5, length 46
10:57:43.454046 ARP, Reply rpi2 is-at b8:27:eb:39:43:ef (oui Unknown), length 28
10:59:40.176783 IP DESKTOP-1AFPVU5.52761 > 239.255.255.250.1900: UDP, length 174
10:59:41.176527 IP DESKTOP-1AFPVU5.52761 > 239.255.255.250.1900: UDP, length 174
10:59:42.176967 IP DESKTOP-1AFPVU5.52761 > 239.255.255.250.1900: UDP, length 174
10:59:42.679130 IP DESKTOP-1AFPVU5.56647 > 224.0.0.253.3544: UDP, length 40
10:59:43.177559 IP DESKTOP-1AFPVU5.52761 > 239.255.255.250.1900: UDP, length 174
10:59:44.950149 ARP, Request who-has rpi2 (b8:27:eb:39:43:ef (oui Unknown)) tell DESKTOP-1AFPVU5, length 46
10:59:44.950559 ARP, Reply rpi2 is-at b8:27:eb:39:43:ef (oui Unknown), length 28
11:00:18.836690 IP DESKTOP-1AFPVU5.netbios-ns > rpi2.netbios-ns: NBT UDP PACKET(137): QUERY; POSITIVE; RESPONSE; UNICAST
11:00:23.449602 ARP, Request who-has rpi2 (b8:27:eb:39:43:ef (oui Unknown)) tell DESKTOP-1AFPVU5, length 46
11:00:23.450014 ARP, Reply rpi2 is-at b8:27:eb:39:43:ef (oui Unknown), length 28
11:01:40.176160 IP DESKTOP-1AFPVU5.57259 > 239.255.255.250.1900: UDP, length 174
11:01:41.175447 IP DESKTOP-1AFPVU5.57259 > 239.255.255.250.1900: UDP, length 174
11:01:42.175884 IP DESKTOP-1AFPVU5.57259 > 239.255.255.250.1900: UDP, length 174
11:01:43.175284 IP DESKTOP-1AFPVU5.57259 > 239.255.255.250.1900: UDP, length 174
Почему идет данный трафик, несмотря на запрет:
17 137 31524 DROP all -- * * 0.0.0.0/0 0.0.0.0/0