Skip to content

Instantly share code, notes, and snippets.

@andrearug
Created March 29, 2018 23:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andrearug/13acc5a158e835ced5bc1aa7032a1595 to your computer and use it in GitHub Desktop.
Save andrearug/13acc5a158e835ced5bc1aa7032a1595 to your computer and use it in GitHub Desktop.
Private networking on ovh with proxmox

On your proxmox server edit /etc/interfaces and add a vmbr1 interface like so

auto lo
iface lo inet loopback

auto vmbr0
iface vmbr0 inet static
        address  167.114.101.88
        netmask  255.255.255.0
        gateway  167.114.101.254
        broadcast  167.114.101.255
        network 167.114.101.0
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0


# Internal Network
auto vmbr1
iface vmbr1 inet static
    address 10.0.1.1/23
    bridge_ports dummy0
    bridge_stp off
    bridge_fd 0
    post-up /sbin/iptables -t nat -A POSTROUTING -o vmbr0 -j MASQUERADE
    pre-down /sbin/iptables -t nat -D POSTROUTING -o vmbr0 -j MASQUERADE

Bring up the new vmbr1 interface

ifdown vmbr1 && ifup vmbr1

Then enable ip forwarding in /etc/sysctl.conf

net.ipv4.ip_forward=1

Load the new values

sysctl -p /etc/sysctl.conf

On your vm configure networking like so

auto eth0
iface eth0 inet static
	address 10.0.1.100
	netmask 255.255.254.0
	gateway 10.0.1.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment