No internet connection

gernazdasch

New Member
Jun 9, 2022
25
1
3
Hello.

I installed for the first time Proxmox, i am trying to connect a windows 10 VM to the internet.

My network :
Screenshot 2022-06-10 at 19-43-09 prne-r051-235cl - Proxmox Virtual Environment.png

My VM config :
Screenshot 2022-06-10 at 19-49-45 prne-r051-235cl - Proxmox Virtual Environment.png

And no internet :
Screenshot 2022-06-10 at 19-50-18 prne-r051-235cl - Proxmox Virtual Environment.png

What is wrong? I connect via web admin panel.
 
Hi,

can you post your /etc/network/interfaces and the config of the Windows vm qm config <vmid>?
 
  • Like
Reactions: gernazdasch
cat /etc/network/interfaces
Code:
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

auto vlan1919
iface vlan1919 inet static
        address xxx.xxx.xxx.xxx/28
        gateway xxx.xxx.xxx.xxx
        bridge_ports bond0.1919
        dns-nameservers yyy.yyy.yyy.yyy zzz.zzz.zzz.zzz

auto eth1
iface eth1 inet manual

auto bond0
iface bond0 inet manual
        bond-slaves eth0 eth1
        bond-miimon 100
        bond-mode 802.3ad
        bond-lacp-rate fast
        bond-xmit_hash_policy layer3+4

iface bond0.1919 inet manual

iface bond0.1920 inet manual

auto vlan1920
iface vlan1920 inet static
        address 10.22.121.11/24
        bridge_ports bond0.1920

auto vmbr0
iface vmbr0 inet static
        address 192.168.10.1/24
        bridge-ports none
        bridge-stp off
        bridge-fd 0

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

qm config 101
Code:
boot: order=ide0;ide2;net0
cores: 4
ide0: local:101/vm-101-disk-0.qcow2,size=100G
ide2: local:iso/virtio-win.iso,media=cdrom,size=519172K
machine: pc-i440fx-5.2
memory: 4096
name: win1
net0: virtio=44:D9:7A:9B:E2:30,bridge=vmbr1
numa: 0
ostype: win10
scsihw: virtio-scsi-pci
smbios1: uuid=1418d177-a85b-3483-bf3b-9e057d9e9f0d
sockets: 1
vga: std
vmgenid: 96f3c372-db9d-4dcd-8e4b-2b52e0acc92e


I have managed to make it work on a test Ubuntu 20.4

Code:
root@lin1:~# ip address
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@if12: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 1a:dc:57:5e:7b:bc brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 192.168.10.15/24 brd 192.168.10.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::18dc:57ff:fe5e:7bbc/64 scope link
       valid_lft forever preferred_lft forever
root@lin1:~# ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data.
64 bytes from 1.1.1.1: icmp_seq=1 ttl=59 time=0.689 ms
64 bytes from 1.1.1.1: icmp_seq=2 ttl=59 time=0.760 ms
^C
--- 1.1.1.1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1016ms
rtt min/avg/max/mdev = 0.689/0.724/0.760/0.035 ms
root@lin1:~#

But on windows can't get it right. I also installed the drivers like in the example here : https://unihost.com/help/settings-nat-proxmox5/

Also i might ask, doing this NAT network, i will have full 1Gbps speed? I am worried that running a virtual OS might not have same bandwidth, even though it is a Type1 hypervisor.

Thank you.
 
Last edited:
Hi

this looks a bit off to me. You have configured 192.168.10.1 as your gateway. But I don't think the VM can see that IP because you added vmbr1 to your VM.

Code:
auto vmbr0
iface vmbr0 inet static
        address 192.168.10.1/24
        bridge-ports none
        bridge-stp off
        bridge-fd 0

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


If you don't need two interfaces in the same network I would just do this in /etc/network/interfaces:

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

and then edit the configuration of the VM and change the network bridge to vmbr0.
 
those are my current interfaces right now and they are working, i have internet :

Code:
auto vmbr0
iface vmbr0 inet static
        address 192.168.10.1/24
        bridge-ports none
        bridge-stp off
        bridge-fd 0

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

auto vmbr2
iface vmbr2 inet static
        address 10.10.10.100/24
        bridge-ports none
        bridge-stp off
        bridge-fd 0
        post-up iptables -t nat -A POSTROUTING -s '10.10.10.0/24' -o vlan1919 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o vlan1919 -j MASQUERADE

When i use use vmbr0 network I set the IP:192.168.10.16 MASK:255.255.255.0 GATEWAY:192.168.10.101
I dont understand why it works because I don't have a POSTROUTING rule on firewall
Also i dont understand why is working with vmbr1's gateway. It is also working with GATEWAY:192.168.10.101
Why is working like this??

When i use use vmbr1 network i set the IP:192.168.10.16 MASK:255.255.255.0 GATEWAY:192.168.10.101

When i use vmbr2 network I set the IP:10.10.10.16 MASK:10.10.10.255 GATEWAY:10.10.10.16

Thank you for the responses.
 
Last edited:
Why do you need to interfaces in the same network (vmbr0, vmbr1)?
 
Just testing, don't need them. I only need 2 interfaces, different networks.

But the question remains, how they even work? Shouldn't be in conflict ?
 
Code:
ip route
default via MY_MAIN_IP dev vlan1919 proto kernel onlink
10.10.10.0/24 dev vmbr2 proto kernel scope link src 10.10.10.100 linkdown
10.22.121.0/24 dev vlan1920 proto kernel scope link src 10.22.121.11
MY_MAIN_IP/28 dev vlan1919 proto kernel scope link src MY_MAIN_IP
192.168.10.0/24 dev vmbr0 proto kernel scope link src 192.168.10.1
192.168.10.0/24 dev vmbr1 proto kernel scope link src 192.168.10.101
 

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!