OVH With Proxmox

devang24393

New Member
Jun 23, 2021
2
0
1
31
I installed Proxmox in the OVH dedicated server, they have provided one public IP.

I am not able to access the internet in my CT and VM.

below is the configuration.


auto lo
iface lo inet loopback

auto eno1
iface eno1 inet manual

iface eno2 inet manual

iface enp0s20f0u8u3c2 inet manual

auto vmbr0
iface vmbr0 inet dhcp
bridge-ports eno1
bridge-stp off
bridge-fd 0

auto vmbr1
iface vmbr1 inet static
address 192.168.10.100/24
bridge-ports none
bridge-stp off
bridge-fd 0


Also, internal communication is working but while try to ssh between VM it's not working.

Can you please help me
 
This is a config that's working on soyoustart, which has mostly the same settings as OVH. OVH boxes may have some slightly different hardware (so eno1 may be labeled something else, you might have multiple NICs, etc. etc.). Up to you to figure that aspect of it out. Otherwise it should be as simple as plugging in your IPs and rebooting.

Code:
auto lo
iface lo inet loopback
iface lo inet6 loopback

auto eno1
iface eno1 inet manual
iface eno1 inet6 manual


auto vmbr0
iface vmbr0 inet static
    address XXX.XXX.XXX.XXX/32
    gateway XXX.XXX.XXX.254
    bridge-ports eno1
    bridge-stp off
    bridge-fd 0
iface vmbr0 inet6 static
    address XXXX:XXXX:XXXX:XXXX::1/64            #Exact range may be variable
    gateway XXXX:XXXX:XXXX:XXFF:FF:FF:FF:FF
    bridge-ports eno1
    bridge-stp off
    bridge-fd 0

auto vmbr1
iface vmbr1 inet static
    address 10.10.10.1/24                        #Pick whatever private address space you want here and below
    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

    #sample NAT port forwarding for containers/VMs that forwards tcp on port 6000.
    post-up   iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 6000 -j DNAT --to 10.10.10.100:6000
    post-down iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 6000 -j DNAT --to 10.10.10.100:6000

    #Bridge fix. Only use if needed.
    #post-up   iptables -t raw -I PREROUTING -i fwbr+ -j CT --zone 1
    #post-down iptables -t raw -D PREROUTING -i fwbr+ -j CT --zone 1

In your containers you'll need to specify a NATed IP that fits your CIDR range using vmbr1 (so 10.10.10.100 with a gateway of 10.10.10.1 works here), or use vmbr0 and failover IPs, in which case the IP is whatever your failover IP is, the gateway is first 3 of failover IP ending in .254, and the mac address is whatever virtual MAC you generate.

Also consider binding the webui to a specific IP so that you can access it even if you misconfigure something. `echo "LISTEN_IP=\"XXX.XXX.XXX.XXX\"" > /etc/default/pveproxy`
 
Last edited:
Still, it is not working, below is updated config

Below is updated.

auto lo
iface lo inet loopback

auto eno1
iface eno1 inet manual

iface eno2 inet manual

iface enp0s20f0u8u3c2 inet manual

auto vmbr0
iface vmbr0 inet dhcp
bridge-ports eno1
bridge-stp off
bridge-fd 0

auto vmbr1
iface vmbr1 inet static
address 192.168.10.100/24
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 '192.168.10.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.10.0/24' -o vmbr0 -j MASQUERADE


1624524464200.png
 
OVH boxes may have some slightly different hardware (so eno1 may be labeled something else, you might have multiple NICs, etc. etc.). Up to you to figure that aspect of it out. Otherwise it should be as simple as plugging in your IPs and rebooting.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!