Skip to content

Instantly share code, notes, and snippets.

@gregf

gregf/readme.md

Last active May 3, 2021
Embed
What would you like to do?
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
@naufdotal

This comment has been minimized.

Copy link

@naufdotal naufdotal commented Nov 20, 2018

bridge_ports dummy0 ? are you sure?

root@ns366161:/etc/apt/sources.list.d# ifup vmbr1
interface dummy0 does not exist!
Waiting for vmbr1 to get ready (MAXWAIT is 2 seconds).
@gfvh

This comment has been minimized.

Copy link

@gfvh gfvh commented Nov 25, 2018

bridge_ports dummy0 ? are you sure?

root@ns366161:/etc/apt/sources.list.d# ifup vmbr1
interface dummy0 does not exist!
Waiting for vmbr1 to get ready (MAXWAIT is 2 seconds).

You need to load kernel module dummy. modprobe dummy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment