C++Guns – RoboBlog

22.11.2009

Port weiterleiten (iptables)

Filed under: Allgemein — Thomas @ 19:11

Um einfach mal einen Port weiterzuleiten langen folgende drei Zeilen:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -A PREROUTING -t nat -p tcp -i eth0 -s 0/0 --dport 8089 -j DNAT --to-destination 192.168.1.111:22

Also ein eingehender Verbindungsversuch auf 192.168.0.101:8089 wird auf 192.168.1.111:22 weitergereicht. Es hat ja nur 2h gedauert das heraus zu finden.

No Comments

No comments yet.

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

Powered by WordPress