Enviado em 11/03/2023 - 21:41h
1)Como instalo o nftables
2)Como configuro o nftables para abrir só sites e downloads e fechar as outras portas?
2)Como configuro o nftables para abrir só sites e downloads e fechar as outras portas?
Enviado em 11/03/2023 - 21:41h
Enviado em 11/03/2023 - 21:41h
Usando esse script, seu nftables irá abrir só os sites necessários nos protocolos HTTP (80) e HTTPS (443) permitindo downloads, e todas as outras portas serão bloqueadas com um ICMP reject.
# nft create table inet firewall_table
# nft add chain firewall_table input { type filter hook input priority 0 \; policy accept \; }
# nft add rule firewall_table input tcp dport 80 ct state established counter accept
# nft add rule firewall_table input tcp dport 443 ct state established counter accept
# nft add rule firewall_table input tcp dport 80 ct state new counter accept
# nft add rule firewall_table input tcp dport 443 ct state new counter accept
# nft add rule firewall_table input reject with icmp type prot-unreachable
Enviado em 11/03/2023 - 21:43h
# nft create table inet firewall_table
# nft add chain firewall_table input { type filter hook input priority 0 \; policy accept \; }
# nft add rule firewall_table input tcp dport 80 ct state established counter accept
# nft add rule firewall_table input tcp dport 443 ct state established counter accept
# nft add rule firewall_table input tcp dport 80 ct state new counter accept
# nft add rule firewall_table input tcp dport 443 ct state new counter accept
# nft add rule firewall_table input reject with icmp type prot-unreachable
Enviado em 11/03/2023 - 21:43h
Enviado em 11/03/2023 - 21:48h
Enviado em 11/03/2023 - 21:48h
Enviado em 11/03/2023 - 21:50h
Enviado em 11/03/2023 - 21:50h
Enviado em 13/03/2023 - 11:35h
Enviado em 13/03/2023 - 13:09h
Enviado em 13/03/2023 - 13:24h
Entre na sua conta para responder.