Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #############################
- ## LIMPANDO TODAS AS REGRAS #
- #############################
- iptables -F
- iptables -t nat -F
- iptables -X
- iptables -t nat -X
- ##################
- ## REGRA PADRAO #
- ##################
- iptables -P INPUT ACCEPT
- iptables -P OUTPUT ACCEPT
- iptables -P FORWARD DROP
- ###########################
- ## ESTABILIZANDO CONEXOES #
- ###########################
- iptables -t filter -A FORWARD -j ACCEPT -m state --state ESTABLISHED,RELATED
- iptables -t filter -A INPUT -j ACCEPT -m state --state ESTABLISHED,RELATED
- ########################
- ## LIBERANDO LOOPBACK #
- ########################
- iptables -A INPUT -i lo -j ACCEPT
- iptables -A FORWARD -i lo -j ACCEPT
- iptables -A OUTPUT -o lo -j ACCEPT
- ##################################################################
- ## Compartilhando a nat conexo onde eth0 e a interface com web #
- ##################################################################
- iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
- #######################################################################
- ## REDIRECIONANDO NAVEGACAO PARA SQUID # Coloca o Endereo da REDE#
- #######################################################################
- iptables -t nat -A PREROUTING -s 192.168.10.0/24 -p tcp -i eth0 -j REDIRECT --to-port 3128
- ####################################
- ## LIBERANDO CONEXAO PARA MAQUINAS #
- ####################################
- iptables -A FORWARD -s 192.168.10.22/32 -d 0/0 -j ACCEPT
- iptables -A FORWARD -s 192.168.10.26/32 -d 0/0 -j ACCEPT
- ################################################
- ## LIBERACAO DE ACESSO PARA SITES ESPECIFICOS #
- ################################################
- iptables -A FORWARD -p tcp -d www.novomundocaminhoes.com.br --dport 2082 -j ACCEPT
- iptables -A FORWARD -p tcp -d www.somdaterra.com.br -j ACCEPT
Advertisement
Add Comment
Please, Sign In to add comment