Skip to content

Instantly share code, notes, and snippets.

@restureese
Created January 25, 2021 03:29
Show Gist options
  • Select an option

  • Save restureese/9a6237c362cf32ff0202a227a579268f to your computer and use it in GitHub Desktop.

Select an option

Save restureese/9a6237c362cf32ff0202a227a579268f to your computer and use it in GitHub Desktop.
#!/bin/sh
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -F
iptables -t nat -F
iptables -X
iptables -t nat -A PREROUTING -p tcp --dport 5000 -j DNAT --to-destination 192.168.100.101:5000
iptables -t nat -A POSTROUTING -j MASQUERADE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment