Skip to content

Instantly share code, notes, and snippets.

View vaporup's full-sized avatar
🤠

Sven Wick vaporup

🤠
View GitHub Profile
@vaporup
vaporup / gist:94809a9804efbe633094bd05f3d296a8
Last active August 12, 2017 19:52
route ports to another host via iptables #iptables
echo "1" > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -p TCP --dport 1235 -j DNAT --to 172.30.16.107:1235
iptables -t nat -A PREROUTING -p TCP --dport 8180 -j DNAT --to 172.30.16.107:49502
iptables -t nat -A POSTROUTING -j MASQUERADE