bsfagundes1
(usa Debian)
Enviado em 02/03/2016 - 21:16h
#!/bin/sh
iptables -A INPUT -p ICMP DROP
echo 1 > /proc/sys/net/ipv4/tcp_syncookies
echo 1 > /proc/sys/net/ipv4/conf/default/rp_filter
iptables -A INPUT -m state --state INVALID -j DROP
modprobe iptable_nat
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A INPUT -p tcp -i lo -j ACCEPT
iptables -A INPUT -p tcp --dport 53 -j ACCEPT
iptables -A INPUT -p ucp --dport 53 -j ACCEPT
iptables -A INPUT -p tcp --dport 3128 -j ACCEPT
#Comando para liberar o IP
iptables -A FORWARD -p tcp -s 192.168.0.0/24 -d 177.125.103.10 --dport 80 -j ACCEPT
iptables -A FORWARD -p tcp -s 192.168.0.0/24 177.125.103.2 --dport 8082 -j ACCEPT