iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o $NIC -j MASQUERADE iptables -A INPUT -i tun0 -j ACCEPT iptables -A FORWARD -i $NIC -o tun0 -j ACCEPT iptables -A FORWARD -i tun0 -o $NIC -j ACCEPT iptables -A INPUT -i $NIC -p $PROTOCOL --dport $PORT -j ACCEPT