Network not working on VM's

Cyber Creek LLX

New Member
Aug 24, 2022
5
0
1
Hello im new to proxmox and I've been trying to find a solution to this but I'm unable to so I thought I would ask here. I bought a dedicated server and installed proxmox on it I have tried with windows and Ubuntu being virtualized on the system and they both will not get Internet. Firewall is not enabled and the network configuration seems valid. My network configuration is down below. This is running on Debian by the way

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

iface eth1 inet manual

auto vmbr0
iface vmbr0 inet static
address 173.249.26.111/24
gateway 173.249.26.1
bridge-ports eth0
bridge-stp off
bridge-fd 0

up ip route replace 173.249.26.0/24 via 173.249.26.1 dev vmbr0
 
Hey,

did you add up ip route replace 173.249.26.0/24 via 173.249.26.1 dev vmbr0, if so, why? Do the VMs have static IPs or do you have a DHCP server assigning them? Could you post ip a and ip r from PVE and the Ubuntu VM?
 
Hey,

did you add up ip route replace 173.249.26.0/24 via 173.249.26.1 dev vmbr0, if so, why? Do the VMs have static IPs or do you have a DHCP server assigning them? Could you post ip a and ip r from PVE and the Ubuntu VM?
I had my server provider Contabo do the install I did find a work around using nat but it seems port forwarding doesn't work with it. It doesn't seem my provider does DHCP because when I try to have my VM's do DHCP it just infinitely tries acquiring a IP that it never gets

From proxmox server
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master vmbr0 state UP group default qlen 1000
link/ether ac:1f:6b:65:12:a2 brd ff:ff:ff:ff:ff:ff
altname eno1
altname enp5s0
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether ac:1f:6b:65:12:a3 brd ff:ff:ff:ff:ff:ff
altname eno2
altname enp6s0
4: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 86:31:84:81:df:d6 brd ff:ff:ff:ff:ff:ff
inet 173.249.26.111/24 brd 173.249.26.255 scope global vmbr0
valid_lft forever preferred_lft forever
inet6 fe80::8431:84ff:fe81:dfd6/64 scope link
valid_lft forever preferred_lft forever
5: vmbr2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 02:a7:57:c5:4b:13 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 brd 192.168.1.255 scope global vmbr2
valid_lft forever preferred_lft forever
inet6 fe80::a7:57ff:fec5:4b13/64 scope link
valid_lft forever preferred_lft forever
6: tap100i0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master fwbr100i0 state UNKNOWN group default qlen 1000
link/ether 22:a7:e4:9f:dd:28 brd ff:ff:ff:ff:ff:ff
7: fwbr100i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 7a:ce:38:dd:13:7e brd ff:ff:ff:ff:ff:ff
8: fwpr100p0@fwln100i0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master vmbr2 state UP group default qlen 1000
link/ether 46:f7:9c:c8:1e:15 brd ff:ff:ff:ff:ff:ff
9: fwln100i0@fwpr100p0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master fwbr100i0 state UP group default qlen 1000
link/ether 52:4e:d6:58:de:ae brd ff:ff:ff:ff:ff:ff

From VM

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: ens18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether d2:ed:bd:54:cd:b2 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.2/24 brd 192.168.1.255 scope global ens18
valid_lft forever preferred_lft forever
inet6 fe80::d0ed:bdff:fe54:cdb2/64 scope link
valid_lft forever preferred_lft forever
 
IP -r from proxmox

default via 173.249.26.1 dev vmbr0 onlink
173.249.26.0/24 via 173.249.26.1 dev vmbr0
192.168.1.0/24 dev vmbr2 proto kernel scope link src 192.168.1.1

IP -r from VM

default via 192.168.1.1 dev ens18 proto static
192.168.1.0/24 dev ens18 proto kernel scope link src 192.168.1.2
 
Code:
...
inet 192.168.1.2/24 brd 192.168.1.255 scope global ens18
...
the VM is on the wrong network, try setting a static IP in Ubuntu. Something that's on 173.249.26.0/24, something like 173.249.26.99/24(just make sure it is not already used on the network).
 
Well after the first post I added this to the end of my network config as a temporary solution tbh would it just be easier for me to buy a dedicated IP for each of my VM's?

auto vmbr2
#private sub network
iface vmbr2 inet static
address 192.168.1.1
netmask 255.255.255.0
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.1.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.1.0/24' -o vmbr0 -j MASQUERADE
 
That depends on what you need, if it works this is a good solution. An alternative would be to setup Wireguard on PVE and route traffic for 192.168.1.0/24 through the VPN, so you wouldn't have to buy more dedicated IPs, but this only makes sense if you need the VMs to be reachable from outside.
 
Last edited:
That depends on what you need, if it works this is a good solution. An alternative would be to setup Wireguard on PVE and route traffic for 192.168.1.0/24 through the VPN, so you wouldn't have to buy more dedicated IPs, but this only makes sense if you need the VMs to be reachable from outside.
Hi! I need such a configuration, can you please help with the setup?
 
Hey,

you can basically follow this guide[1] (or use the small script mentioned there[2]). The only thing you have to change is the AllowedIPs on a client, so instead of routing all the traffic through the VPN(0.0.0.0/0), you only route the network your VMs are on(something like 192.168.1.0/24). After having this setup on PVE, when a client is connected to the VPN all traffic for 192.168.1.0/24 will be send through the VPN(to PVE) and PVE than forwards it.

If you also want to use IPv6, you can replace the ::/0 in AllowedIPs by the actual network your VMs are on(same as for IPv4).

[1] https://stanislas.blog/2019/01/how-to-setup-vpn-server-wireguard-nat-ipv6/
[2] https://github.com/angristan/wireguard-install
 
Hello im new to proxmox and I've been trying to find a solution to this but I'm unable to so I thought I would ask here. I bought a dedicated server from ovh and installed proxmox on it I have tried with centos 6 nad centos 7 virtualized on the system and they both will not get Internet. Firewall is not enabled and the network configuration seems valid. i ahve also brought failover ip for every vm.what can i dow now .can any body help or give my solutions
 
Finally i have successs fully ..configure centos 6 on prosmox vm which run on ovh dedicated server .after set up on prosmoxvm centos6 successfuly we have to change the folling location====>>
/etc/sysconfig/network-scripts/route-eth0 just fillup
GATEWAY_IP dev eth0
default via GATEWAY_IP dev eth0
Save and close the file, then reboot your virtual machine.


===> aslo we have to follow that defultgateway ip is the main sever defult gateway <====
 

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!