Proxmox Private Network no internet

mrg

New Member
Jun 30, 2020
8
0
1
39
Hello,

I have followed a few tutorials on how to get this working correctly but i seem to be stuck, hopefully I will get some answers regarding setup and best practices for What I am trying to achieve.

Web hosting Setup 1 Vm running NGINX Reverse Proxy.
Customers websites etc running on other VMS within the private network.

The server setup:
OVH - Single Ip, Failover ip(mac address applied)
-- xx.xx.118.168 host
-- xx.xx.198.160 Proxy (failover,mac)

PROXMOX MAIN GATEWAY - vmbr0 BRIDGE eno1(network device)
-- IP: XX.XX.118.168/32
-- GW: XX.XX.118.254

NGINX Reverse Proxy - Public Facing - Private Network - MacAddress
-- IP: XX.XX.198.160 //PUBLIC IP
-- IP: 192.168.1.9
-- GW: 192.168.1.254

ALL OTHER VMS on private network
Static IP: 192.168.1.XXX - GW:192.168.1.254

CURRENT PROXMOX HOST /etc/network/interfaces
Code:
auto lo
iface lo inet loopback

iface eno1 inet manual

iface eno2 inet manual

auto vmbr0
iface vmbr0 inet static
        address XX.XX.118.168/32
        gateway XX.XX.118.254
        bridge-ports eno1
        bridge-stp off
        bridge-fd 0

auto vmbr1
iface vmbr1 inet static
        address 192.168.1.254/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 -o vmbr0 -j MASQUERADE
        post-down iptables -t nat -A POSTROUTING -o vmbr0 -j MASQUERADE

ip route - HOST
default via xx.xx.118.254 dev vmbr0 proto kernel onlink
192.168.1.0/24 dev vmbr1 proto kernel scope link src 192.168.1.254

FROM PVE (this is proxmox auto detect settings, except vmbr1)
1599649223555.png


NGINX VM current network settings HAS INTERNET - UBUNTU

1599650340048.png

Code:
network:
    version: 2
    renderer: networkd
    ethernets:
        ens19:
            match:
                name: ens19
                macaddress: xx:xx:xx:xx:xx:xx
            dhcp4: no
            dhcp6: no
            addresses:
                - xx.xx.198.160/32
                - 192.168.1.9/24
            gateway4: xx.xx.118.254
            nameservers:
                addresses: [1.1.1.1,8.8.8.8]
            routes:
            - to: xx.xx.118.254/32
              via: 0.0.0.0
              scope: link
            - to: 192.168.1.254/24
              via: 0.0.0.0
              scope: link


Debian VM - can ping the private network but doesnt seem to be getting internet the differences are that the ubuntu netplan has the failover ip in its network config where the debian one does not.
Code:
auto lo
iface lo inet loopback
allow-hotplug ens19
iface ens19 inet static
hwaddr xx:xx:xx:xx:xx:xx:xx
address 192.168.1.10/24
gateway 192.168.1.254
nameserver 1.1.1.1,8.8.8.8


Now for each vm would i need to apply the same mac address? as its included in the nginx network config, does it need adding to every vm i create?
or what is the best setup for what im trying to do. That private network is currently on host, should that be on the nginx proxy then force all vms through there with internet?


Appreciate any advice or help new to proxmox.
Kind Regards
 
Last edited: