port forward avec netfilter
Voici comment faire un port forward + masquerade avec netfilter (sous linux à priori donc):
- iptables -F FORWARD
- iptables -A FORWARD -j ACCEPT
- iptables -F -t nat
- iptables -A POSTROUTING -t nat -o eth99 -j MASQUERADE
- iptables -A PREROUTING -t nat -p tcp --dport 9999 -j DNAT --to 192.168.99.99:9999
- echo 1 > /proc/sys/net/ipv4/ip_forward


0 Comments:
Enregistrer un commentaire
<< Home