Created
December 9, 2019 22:08
-
-
Save micoli/6a3dfc0b58d430acecbc5b422a8bca9e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
iptables -t filter -A FORWARD -o vmbr2 -j ACCEPT | |
iptables -t filter -A FORWARD -i vmbr2 -j ACCEPT | |
echo 1 > /proc/sys/net/ipv4/ip_forward | |
iptables -t nat -A POSTROUTING -o vmbr2 -j MASQUERADE | |
iptables -t nat -A PREROUTING -p tcp -d external.public.ip --dport 5000 -i vmbr0 -j DNAT --to-destination 10.8.1.2:5000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment