1106 shaares
1 result
tagged
forwarding
#!/bin/bash
# usage : port_forward ip_destination port_destination wan_interface
sudo iptables -t nat -A PREROUTING -p tcp -i $3 --dport $2 -j DNAT --to-destination $1:$2
sudo iptables -A FORWARD -p tcp -d $1 --dport $2 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
Oui, simple oubli de ma part, shaarli doit mieux marcher maintenant...
# usage : port_forward ip_destination port_destination wan_interface
sudo iptables -t nat -A PREROUTING -p tcp -i $3 --dport $2 -j DNAT --to-destination $1:$2
sudo iptables -A FORWARD -p tcp -d $1 --dport $2 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
Oui, simple oubli de ma part, shaarli doit mieux marcher maintenant...