Portál AbcLinuxu, 14. května 2025 16:51
# iptables -A INPUT -p udp --dport 500 -j ACCEPT # iptables -A INPUT -p udp --dport 4500 -j ACCEPTa uložím zmenu pomocí
iptables-save > /etc/iptables/udp.rule
Ve výpisu pak jsou # iptables -L --line-numbers Chain INPUT (policy ACCEPT) num target prot opt source destination 1 ACCEPT udp -- anywhere anywhere udp dpt:isakmp 2 ACCEPT udp -- anywhere anywhere udp dpt:ipsec-nat-t Chain FORWARD (policy ACCEPT) num target prot opt source destination 1 DOCKER-ISOLATION all -- anywhere anywhere 2 DOCKER all -- anywhere anywhere 3 ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED 4 ACCEPT all -- anywhere anywhere 5 ACCEPT all -- anywhere anywhere 6 DOCKER all -- anywhere anywhere 7 ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED 8 ACCEPT all -- anywhere anywhere 9 ACCEPT all -- anywhere anywhere 10 DOCKER all -- anywhere anywhere 11 ACCEPT all -- anywhere anywhere ctstate RELATED,ESTABLISHED 12 ACCEPT all -- anywhere anywhere 13 ACCEPT all -- anywhere anywhere Chain OUTPUT (policy ACCEPT) num target prot opt source destination Chain DOCKER (3 references) num target prot opt source destination 1 ACCEPT tcp -- anywhere 172.17.0.2 tcp dpt:http-alt Chain DOCKER-ISOLATION (1 references) num target prot opt source destination 1 DROP all -- anywhere anywhere 2 DROP all -- anywhere anywhere 3 DROP all -- anywhere anywhere 4 DROP all -- anywhere anywhere 5 DROP all -- anywhere anywhere 6 DROP all -- anywhere anywhere 7 RETURN all -- anywhere anywhereKdyž ale chci ověřit, jestli jsou porty otevřeny, zjistím že ne:
nc -vzu 127.0.0.1 500 localhost.localdomain [127.0.0.1] 500 (isakmp) : Connection refusedDěkuji za jakoukoliv radu
Řešení dotazu:
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.