Portál AbcLinuxu, 29. listopadu 2025 19:59
Chain INPUT (policy ACCEPT) target prot opt source destination RH-Firewall-1-INPUT all -- anywhere anywhere Chain FORWARD (policy ACCEPT) target prot opt source destination RH-Firewall-1-INPUT all -- anywhere anywhere Chain OUTPUT (policy ACCEPT) target prot opt source destination Chain RH-Firewall-1-INPUT (2 references) target prot opt source destination ACCEPT all -- anywhere anywhere * ACCEPT icmp -- anywhere anywhere icmp any ACCEPT esp -- anywhere anywhere ACCEPT ah -- anywhere anywhere ACCEPT udp -- anywhere 224.0.0.251 udp dpt:mdns ACCEPT udp -- anywhere anywhere udp dpt:ipp ACCEPT tcp -- anywhere anywhere tcp dpt:ipp ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:telnet ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:smtp ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ftp ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:https ACCEPT udp -- anywhere anywhere state NEW udp dpt:netbios-ns ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh //ked toto zmazem tak pravidlo * nefunguje ACCEPT udp -- anywhere anywhere state NEW udp dpt:netbios-dgm ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:netbios-ssn ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:microsoft-ds ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:nfs REJECT all -- anywhere anywhere reject-with icmp-host-prohibited
iptables -L -nvx , z toho budeme mudrejsi ako z toho co je hore.
dnes 00:00 [Jooky] | skóre: 31nula deleno nula ;o)
Ten accept anywhere to anywhere je tam zbytecne, pokud mas na konci reject from anywhere to anywhere. A kdyz smazes na konci ten reject, tak jsou zase zbytecne vsechny ostatni
Obzvlaste v pripade RedHatu doporucuji poradne prostudovat nejaky iptables manual, prestat pouzivat system-config-securitylevel a napsat si vsechny pravidla rucne. Pripisovani novych pravidel do configu vygenerovaneho system-config-securitylevelem se seredne nevyplaci. Ja jsem to u nas vyresil chmod -x system-config-securitylevel, aby nahodou nekoho nenapadlo se toho vbec dotknout, a pravidla mam v /etc/sysconfig/iptables, ktere pracuji s /etc/init.d/iptables.
iptables -L -nvx
Chain RH-Firewall-1-INPUT (2 references)
pkts bytes target prot opt in out source destination
1363 112169 ACCEPT all -- lo * 0.0.0.0/0 0.0.0.0/0
Dakujem
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.