Skip to content

Instantly share code, notes, and snippets.

@JulienBreux
Last active August 29, 2015 14:16
Show Gist options
  • Save JulienBreux/b3f88e8fdb7174ca31a6 to your computer and use it in GitHub Desktop.
Save JulienBreux/b3f88e8fdb7174ca31a6 to your computer and use it in GitHub Desktop.
Proxmox Master Host
auto vmbr1
iface vmbr1 inet static
address 10.10.10.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.10.10.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o vmbr0 -j MASQUERADE
iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 80 -j DNAT --to-destination 10.10.10.1:80
iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 443 -j DNAT --to-destination 10.10.10.1:443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment