iptables (firewall)
./firewall
Categoria: Segurança
Software: iptables
[ Hits: 9.744 ]
Por: Antonio Thomacelli
Firewall caseiro, para bloquear tudo ótimo para quem só usa internet
#! /bin/bash ########################### # TITULO ABRE # echo "Iniciando FIREWALL" ########################### ###################### #Zera todas as Regras# ###################### echo "Regras Zeras" iptables -F ######################################## # Bloqueia tudo, nada entra e nada sai # ######################################## echo "Fechando tudo..." iptables -P INPUT DROP iptables -P FORWARD DROP iptables -P OUTPUT DROP ################################### # Libera conexoes estabelecidas # ################################### echo "Liberando conexoes..." iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACC EPT iptables -A FORWARD -m state --state RELATED,ESTABLISHED,NEW -j ACCEPT iptables -A OUTPUT -m state --state RELATED,ESTABLISHED,NEW -j ACCEPT iptables -A INPUT -i lo -j ACCEPT ################### # COMPARTILHAMENTO# ################### # # iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE # ########################### # TITULO FECHA # echo "FIREWALL CONCLUIDO" ###########################
Servidor de Backup com Ubuntu Server 24.04 LTS, RAID e Duplicati (Dell PowerEdge T420)
Visualizar câmeras IP ONVIF no Linux sem necessidade de instalar aplicativos
Atualizar Debian Online de uma Versão para outra
Dica para encontrar diversos jogos Indies criativos
Instalando Discord no Debian 13
Instalar driver Nvidia no Debian 13
Redimensionando, espelhando, convertendo e rotacionando imagens com script
Falha add cluster Proxmox (2 nós) (0)
O que você está ouvindo agora? [2] (218)
Software livre - será que eu estou tão errado assim? (17)
Dificuldade com Ocs 2.12.3 no Debian 13 com Apache2 - Can't load ... (4)