rendered paste body#!/bin/sh
iptables -F
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
echo "Abrindo portas do samba"
iptables -A INPUT -p tcp --dport 137:139 -j ACCEPT
iptables -A INPUT -p tcp --dport 445 -j ACCEPT
iptables -A INPUT -p udp -i eth0 -s 10.0.0.0/255.0.0.0 -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE
iptables -t nat -A PREROUTING -p tcp --dport 4899 -d 10.0.0.100 -j DNAT --to-destination 192.168.0.10
iptables -A INPUT -m state --state ESTABLISHED,RELATED,NEW -j ACCEPT
iptables -A INPUT -p icmp -s 10.0.0.0/24 --icmp-type echo-request -j ACCEPT
iptables -A INPUT -p tcp --dport 8567 -s 10.0.0.0/24 -j ACCEPT
echo "0" > /proc/sys/net/ipv4/icmp_echo_ignore_all
echo 1 > /proc/sys/net/ipv4/ip_forward