Created
September 3, 2018 10:54
-
-
Save jesgeerts/c5e0e4cc9a83f33303c7c75511a38ac2 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
auto vmbr2 | |
iface vmbr2 inet static | |
address 10.0.0.254 | |
netmask 255.255.255.0 | |
bridge_ports none | |
bridge_stp off | |
bridge_fd 0 | |
post-up echo 1 > /proc/sys/net/ipv4/ip_forward | |
post-up iptables -t nat -A POSTROUTING -s '10.0.0.0/24' -o vmbr0 -j MASQUERADE | |
post-down iptables -t nat -D POSTROUTING -s '10.0.0.0/24' -o vmbr0 -j MASQUERADE | |
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 3389 -j DNAT --to 10.0.0.2:3389 | |
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 3389 -j DNAT --to 10.0.0.2:3389 | |
# post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 3389 -j DNAT --to 10.0.0.2:3389 | |
# is able to portforward the port 3389 for the VM with the IP 10.0.0.2 | |
# Assign the VM's with their own IP manually or use a DHCP server on the PVE node |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For the DHCP server on the node there is aditional configuration required.