Ale mele ufw
este activat și permite doar ssh și wireguard:
stare # ufw
Stare: activ
La Acțiune De la
-- ------ ----
22/tcp PERMITERE oriunde
51820/udp ALLOW Oriunde
22/tcp (v6) PERMITERE oriunde (v6)
51820/udp (v6) PERMITERE oriunde (v6)
#
De asemenea, comunic prin gazda 169.254.169.254 pe BGP (Port 179).
Această comunicare funcționează, deși eu o fac nu permite. De ce??
Este pentru că 169.254.169.254 este o adresă locală de link? (Este interesant că interfața o face nu au definită o adresă locală de legătură. Comunicarea trece peste gateway-ul implicit. Aceasta este configurarea pe Vultr hosting).
M-am uitat în iptables, dar nu văd cum ar fi acceptate aceste pachete: lanțul ufw-not-local are o referință la adrese LOCAL:
# iptables -v -L ufw-not-local
Lanț ufw-not-local (1 referințe)
pkts bytes target prot opt in out source destination
508 30944 RETURN all -- oricare oriunde oriunde oriunde ADDRTYPE potriviți dst-type LOCAL
0 0 RETURN all -- orice oriunde oriunde oriunde ADDRTYPE potriviți dst-type MULTICAST
125 6739 RETURN all -- oriunde oriunde oriunde ADDRTYPE se potrivește cu DST-type BROADCAST
0 0 ufw-logging-deny all -- oriunde oriunde oriunde limită: medie 3/min burst 10
0 0 DROP all -- oriunde oriunde oriunde
#
Cu toate acestea, este o RETURNARE și nu un ACCEPT! ufw-not-local este apelat de ufw-before-input care ar reveni la INPUT. Și INPUT are politica DROP.
EDITAȚI | ×: Deplin iptables -xvnL
ieșire:
INTRARE în lanț (politica DROP 8 pachete, 885 octeți)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp -- lxcbr0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:53
0 0 ACCEPT udp -- lxcbr0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:53
0 0 ACCEPT tcp -- lxcbr0 * 0.0.0.0/0 0.0.0.0/0 tcp dpt:67
750 227375 ACCEPT udp -- lxcbr0 * 0.0.0.0/0 0.0.0.0/0 udp dpt:67
362606 147280078 ufw-before-logging-input all -- * * 0.0.0.0/0 0.0.0.0/0
362606 147280078 ufw-before-input all -- * * 0.0.0.0/0 0.0.0.0/0
333869 128555765 ufw-după-intrare toate -- * * 0.0.0.0/0 0.0.0.0/0
333212 128523819 ufw-după-înregistrare-intrare toate -- * * 0.0.0.0/0 0.0.0.0/0
333212 128523819 ufw-reject-input all -- * * 0.0.0.0/0 0.0.0.0/0
333212 128523819 ufw-track-input all -- * * 0.0.0.0/0 0.0.0.0/0
Lanț FORWARD (politica DROP 216 pachete, 10004 octeți)
pkts bytes target prot opt in out source destination
22278 14578660 ACCEPT pe toate -- * lxcbr0 0.0.0.0/0 0.0.0.0/0
4853 256884 ACCEPT pe toate -- lxcbr0 * 0.0.0.0/0 0.0.0.0/0
1080537 59537850 ufw-before-logging-forward all -- * * 0.0.0.0/0 0.0.0.0/0
1080537 59537850 ufw-înainte-înainte toate -- * * 0.0.0.0/0 0.0.0.0/0
1079360 59452755 ufw-după-înainte toate -- * * 0.0.0.0/0 0.0.0.0/0
1079360 59452755 ufw-după-logging-forward toate -- * * 0.0.0.0/0 0.0.0.0/0
1079360 59452755 ufw-reject-forward all -- * * 0.0.0.0/0 0.0.0.0/0
1079360 59452755 ufw-track-forward all -- * * 0.0.0.0/0 0.0.0.0/0
IEȘIRE în lanț (politica ACCEPTĂ 1 pachet, 52 de octeți)
pkts bytes target prot opt in out source destination
424797 45621305 ufw-before-logging-output all -- * * 0.0.0.0/0 0.0.0.0/0
424797 45621305 ufw-înainte de ieșire toate -- * * 0.0.0.0/0 0.0.0.0/0
399178 42100854 ufw-după-ieșire toate -- * * 0.0.0.0/0 0.0.0.0/0
399178 42100854 ufw-după-logging-output toate -- * * 0.0.0.0/0 0.0.0.0/0
399178 42100854 ufw-reject-output all -- * * 0.0.0.0/0 0.0.0.0/0
399178 42100854 ufw-track-output toate -- * * 0.0.0.0/0 0.0.0.0/0
Lanț ufw-before-logging-input (1 referințe)
pkts bytes target prot opt in out source destination
Lanț ufw-before-logging-output (1 referințe)
pkts bytes target prot opt in out source destination
Lanț ufw-before-logging-forward (1 referințe)
pkts bytes target prot opt in out source destination
Lanț ufw-before-input (1 referințe)
pkts bytes target prot opt in out source destination
0 0 ACCEPT toate -- lo * 0.0.0.0/0 0.0.0.0/0
142 17992 ACCEPT toate -- * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,STABLISHED
0 0 ufw-logging-deny all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate INVALID
0 0 DROP all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate INVALID
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 3
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 11
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 12
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 8
0 0 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp spt:67 dpt:68
16 1305 ufw-not-local all -- * * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT udp -- * * 0.0.0.0/0 224.0.0.251 udp dpt:5353
0 0 ACCEPT udp -- * * 0.0.0.0/0 239.255.255.250 udp dpt:1900
16 1305 ufw-user-input toate -- * * 0.0.0.0/0 0.0.0.0/0
Lanț ufw-before-output (1 referințe)
pkts bytes target prot opt in out source destination
0 0 ACCEPT toate -- * lo 0.0.0.0/0 0.0.0.0/0
150 18656 ACCEPT toate -- * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,STABLISHED
1 52 ufw-user-output all -- * * 0.0.0.0/0 0.0.0.0/0
Lanț ufw-before-forward (1 referințe)
pkts bytes target prot opt in out source destination
11 1232 ACCEPT toate -- * * 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,STABLISHED
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 3
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 11
0 0 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 12
13 1092 ACCEPT icmp -- * * 0.0.0.0/0 0.0.0.0/0 icmptype 8
214 9920 ufw-user-forward all -- * * 0.0.0.0/0 0.0.0.0/0
Lanț ufw-după-input (1 referințe)
pkts bytes target prot opt in out source destination
0 0 ufw-skip-to-policy-input udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:137
0 0 ufw-skip-to-policy-input udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:138
0 0 ufw-skip-to-policy-input tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:139
0 0 ufw-skip-to-policy-input tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:445
0 0 ufw-skip-to-policy-input udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:67
0 0 ufw-skip-to-policy-input udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:68
3 120 ufw-skip-to-policy-input all -- * * 0.0.0.0/0 0.0.0.0/0 ADDRTYPE se potrivește cu DST-type BROADCAST
Lanț ufw-după-ieșire (1 referințe)
pkts bytes target prot opt in out source destination
Lanț ufw-after-forward (1 referințe)
pkts bytes target prot opt in out source destination
Lanț ufw-după-logging-input (1 referințe)
pkts bytes target prot opt in out source destination
7 845 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limită: medie 3/min rafală 10 semnalizatoare LOG 0 nivel 4 prefix „[UFW BLOCK]”
Lanț ufw-după-logging-output (1 referințe)
pkts bytes target prot opt in out source destination
Lanț ufw-după-logging-forward (1 referințe)
pkts bytes target prot opt in out source destination
10 464 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limită: rafală medie 3/min 10 semnalizatoare LOG 0 nivel 4 prefix „[UFW BLOCK]”
Lanț ufw-reject-input (1 referințe)
pkts bytes target prot opt in out source destination
Lanț ufw-reject-output (1 referințe)
pkts bytes target prot opt in out source destination
Lanț ufw-reject-forward (1 referințe)
pkts bytes target prot opt in out source destination
Lanț ufw-track-input (1 referințe)
pkts bytes target prot opt in out source destination
Lanț ufw-track-output (1 referințe)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 ctstate NOU
0 0 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 ctstate NOU
Lanț ufw-track-forward (1 referințe)
pkts bytes target prot opt in out source destination
Lanț ufw-logging-deny (2 referințe)
pkts bytes target prot opt in out source destination
0 0 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0 ctstate Limită INVALIDĂ: medie 3/min burst 10
0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limită: medie 3/min burst 10 semnalizatoare LOG 0 nivel 4 prefix „[UFW BLOCK]”
Lanț ufw-logging-allow (0 referințe)
pkts bytes target prot opt in out source destination
0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limită: medie 3/min burst 10 semnalizatoare LOG 0 nivel 4 prefix „[UFW ALLOW]”
Lanț ufw-skip-to-policy-input (7 referințe)
pkts bytes target prot opt in out source destination
3 120 DROP toate -- * * 0.0.0.0/0 0.0.0.0/0
Lanț ufw-skip-to-policy-output (0 referințe)
pkts bytes target prot opt in out source destination
0 0 ACCEPT pe toate -- * * 0.0.0.0/0 0.0.0.0/0
Lanț ufw-skip-to-policy-forward (0 referințe)
pkts bytes target prot opt in out source destination
0 0 DROP toate -- * * 0.0.0.0/0 0.0.0.0/0
Lanț ufw-not-local (1 referințe)
pkts bytes target prot opt in out source destination
12 1125 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0 ADDRTYPE se potrivește cu dst-type LOCAL
0 0 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0 ADDRTYPE potrivește tip dst MULTICAST
4 180 RETURN all -- * * 0.0.0.0/0 0.0.0.0/0 ADDRTYPE se potrivește cu DST-type BROADCAST
0 0 ufw-logging-deny all -- * * 0.0.0.0/0 0.0.0.0/0 limită: medie 3/min burst 10
0 0 DROP toate -- * * 0.0.0.0/0 0.0.0.0/0
Lanț ufw-user-input (1 referințe)
pkts bytes target prot opt in out source destination
5 300 ACCEPT tcp -- * * 0.0.0.0/0 0.0.0.0/0 tcp dpt:22
0 0 ACCEPT udp -- * * 0.0.0.0/0 0.0.0.0/0 udp dpt:51820
Lanț ufw-user-output (1 referințe)
pkts bytes target prot opt in out source destination
Lanț ufw-user-forward (1 referințe)
pkts bytes target prot opt in out source destination
Lanț ufw-user-logging-input (0 referințe)
pkts bytes target prot opt in out source destination
Lanț ufw-user-logging-output (0 referințe)
pkts bytes target prot opt in out source destination
Lanț ufw-user-logging-forward (0 referințe)
pkts bytes target prot opt in out source destination
Lanț ufw-user-limit (0 referințe)
pkts bytes target prot opt in out source destination
0 0 LOG all -- * * 0.0.0.0/0 0.0.0.0/0 limită: rafală medie 3/min 5 semnalizatoare LOG 0 nivel 4 prefix „[UFW LIMIT BLOCK]”
0 0 REJECT all -- * * 0.0.0.0/0 0.0.0.0/0 reject-with icmp-port-unreachable
Lanț ufw-user-limit-accept (0 referințe)
pkts bytes target prot opt in out source destination
0 0 ACCEPT pe toate -- * * 0.0.0.0/0 0.0.0.0/0