Firewalld – blokada połączeń wychodzących
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Allow established connections: firewall-cmd --permanent --direct --add-rule ipv4 filter OUTPUT 0 -m state --state ESTABLISHED,RELATED -j ACCEPT Allow HTTP: firewall-cmd --permanent --direct --add-rule ipv4 filter OUTPUT 1 -p tcp -m tcp --dport 80 -j ACCEPT Allow HTTPS: firewall-cmd --permanent --direct --add-rule ipv4 filter OUTPUT 1 -p tcp -m tcp --dport 443 -j ACCEPT Allow for DNS queries: firewall-cmd --permanent --direct --add-rule ipv4 filter OUTPUT 1 -p tcp -m tcp --dport 53 -j ACCEPT # firewall-cmd --permanent --direct --add-rule ipv4 filter OUTPUT 1 -p udp --dport 53 -j ACCEPT Deny everything else: firewall-cmd --permanent --direct --add-rule ipv4 filter OUTPUT 2 -j DROP |
