1

I have a Proxmox setup in OVH I have purchased 8 IPs out of which 6 are useable So I want that my virtual machines are reachable from the internet.

The Ip block I have purchased

53.87.160.116/29

Ip from OVH to the Proxmox machine

44.63.32.23/24 it is received via DHCP

So this is my file contents

cat /etc/network/interfaces

# network interfaces
    auto lo
    iface lo inet loopback
    
    iface eno1 inet manual
    
    auto vmbr0
    iface vmbr0 inet dhcp
      bridge-ports eno1
      bridge-stp off
      bridge-fd 0
      post-up echo 1 > /proc/sys/net/ipv4/ip_forward
      post-up echo 1 > /proc/sys/net/ipv4/conf/vmbr0/proxy_arp

    auto vmbr1
    iface vmbr1 inet static
        address  44.63.32.23/24   ## vmbr0 get the same ip/subnet so i placed this
        bridge-ports none
        bridge-stp off
        bridge-fd 0 
        post-up iP route add 53.87.160.116/29 via vmbr1


    auto vmbr2
    iface vmbr2 inet static 
        address 10.0.0.1/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 '10.0.0.0/24' -o vmbr0 -j MASQUERADE

cat /etc/network/interfaces.d/50-cloud-init

# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
auto lo
iface lo inet loopback
    dns-nameservers 213.186.33.99

auto eth0
iface eth0 inet dhcp
    mtu 1500

Now when I create a new machine bridged to interface vmbr1

And give following details to vm

IP: 53.87.160.117 /29
Gateway: 44.63.32.23
DNS: 8.8.8.8

This doesn't work any suggestion

Thank you

sanjib
  • 63
  • 7
  • 1
    i would setup vmbr with a lanip as router, moreover you need to enable routing else it wont work and the gateway for the vm is the ip of vmbr1 (44.63.32.23), i use `post-up route add dev vmbr1 ` you can take a look at https://serverfault.com/questions/975406/proxmox-hosting-a-server-with-single-ip-and-nat-and-or-a-public-ip-on-containe i showed there a setup i use – djdomi Dec 26 '21 at 13:38
  • Hello @djdomi sir I am not understanding what is going wrong with the setup. For example lets forget I have any VM I just have the public interface for proxmox and that's it and now I have purchased ips of the block that I have mentioned now when I give the command ================== ip addr add dev ens33 53.87.160.117/29 ======> this command is accepted but the ip is stillnot pingable or reachable – sanjib Dec 26 '21 at 17:08
  • dear sanjib, i suggests that we continue on https://chat.stackexchange.com/rooms/132623/thechat2 due it would break the rules if we chat here – djdomi Dec 26 '21 at 17:15

0 Answers0