[SOLVED] [PVE5] Internet on VM but not to ProxMox host

Name

New Member
Nov 16, 2017
10
1
1
44
Hi all,

I've installed ProxMox VE 5 into a computer with 2 ethernet card, 1 is connected to my FreeBox (router Off) : enp1s0 ; the second to my local switch hub enp2s0.

I have a pfSense VM for firewall configuring with vmbr0->enp1s0 and vmbr1->enp2s0.

I have internet under my computer connecting toi the hub and under pfSense ; but my ProxMox host don't.

/etc/network/interfaces :
auto lo
iface lo inet loopback

auto enp1s0
iface enp1s0 inet dhcp

iface enp2s0 inet manual

auto vmbr0
iface vmbr0 inet manual
bridge_ports enp1s0
bridge_stp off
bridge_fd 0

auto vmbr1
iface vmbr1 inet static
address 192.168.1.254
netmask 255.255.255.0
bridge_ports enp2s0
bridge_stp off
bridge_fd 0

auto vmbr2
iface vmbr2 inet static
address 191.168.1.254
netmask 255.255.255.0
bridge_ports DMZ
bridge_stp off
bridge_fd 0

Is it possible for my ProxMox host to connect internet throw the vmbr1 (connect to LAN interface of my pfsense) ?

Regards
 
I dont know how to find the Gateway, I turn off my FreeBox router so my public IP is directly input to the WAN of pfSense.
I share with you a scheme of my Home lab :
w5YiKHXjdHtg46cNrS1DyFzfRX2eBnahCg3UztRf62M31Fs-E7Jc9aUJF86maPGGdz8IQF2Rsfvl2PU8Gax8bUF0eSxAygd3ttGqyjHJxmzAqd5ZaMbh9SPd17G_kRpSZ7F875_oNTqyBq6UX3RpZGnblPTZpYzkzVxFSmOvGhmDhi6Fa69l8A898r4D9lIs4hEjQyI9jjiLA5CF9Vupxi5aiRvBWBcB8MK1fPvlhs21CSWVljZddlCAt0WUAMWi1NhTuyHrdJ5iP_n3EpHC55EEljkJw-NJon26Q-bgpNpVM7KcopV9skqpIswcwCxPYlgFeHIVQdMSHIVKkwitnoj_-2HEXz8EqnOEUn1YofFhtXwfvvqsMoZ3_Wey_QYnDiNLDPo_uvf9_pGHmMbdIxdyYJ_9q53Z8ObQvnYNL8SFQB6T5nA5aVtaszboik6E5PHqO8_GeI1Pbfe-TEEpyCVq0uG4M2HKQZ208ZvqvtT-4tYw50AWah820mhmnmfEejraFHMLvY1RlrAfi_dv-26BpA3yj7CeY_5TC-JWnIkllzrkX55hMDFSlXvoWY3AxnoLwQ3NNLlJx9fR65m3MTm8iHbzDHMcsAo8FcVobOqh_qErrbDIkXcwvgO8t0zEjA74j-lBsDjzU3cxRHi00CDrkYETk-s4lQ=w707-h572-no
 
Hi,
if you use as default-gw 192.168.1.1 (on vmbr1) all traffic (except for 10.0.0.0/24) will be routed through your pfsense-vm (if i read the ips on the pic right).

Use firewall rules to allow the dns-access (look at /etc/resolv.conf) and the outgoing pve-access.

Udo
 
Ok, so I'll set the pfSense Gateway to the ProxMox host /etc/resolv.conf :
domain WORKGROUP
search WORKGROUP
nameserver 192.168.1.1
And I'll create a pfSense rules to allow port 53 from LAN to anywhere
Em25Wnu9f-s6I6ZCR7RiQJ1Tj9evxWRFMSDjShXP7eqo74XTrj-_2ReIq3dz6wZ0Dj4yDNButb1Aj851olTHQ5QnIXPVJZj0kNVkiJEgMQbDtvWzrdyRCf9WB7nBq14QillApnDsqKeC-RvRdBSoTy4thOBHLN-jFXKJg4e5zSlp0uHv-Qm-IJ1MIIDpn6pzijk7Z34BOdw_v5qi-ohX1fwM8m-U8EZYRHNJJPwVgjhNdacEIT1_EjPRYMS47D0RH8PX7Xq0tyf0WhEsomfIX1Pjh0vFWwdX-QWa0Qayltdqz9euaSO95J1kJYaQsZopjX4OlNqhgJbnkOPv0KtWFJ7G8c6knvhEmHsWfDcaDrxH3HaxdQsuYb22MvemnEejoXVnBVuWOUgZZ7s5IB53oUh9cwWoxNx4MLwj9A8H7abwJpcEH-qv1DCEwampf0H4SNR2nTwdYjjRLmOjOM3VHEZIA8SN1OsIc4TUQDcApYa88AaExINvWtjuUmP0awkvHBkJfbwtIQ36aYhfOsS8oUShBYq4e2Uoj2vfKDmGxszbtAlXyOYFbotqa64z62TsOG3-AYqR_cKps7zZVVqTCrpENECW6-3AUew8LEA4=w1158-h435-no

ProxMox host : /etc/network/interfaces
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage part of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback

iface enp1s0 inet manual
#Internet

iface enp2s0 inet manual
#Réseau local

auto vmbr0
iface vmbr0 inet manual
bridge_ports enp1s0
bridge_stp off
bridge_fd 0
#WAN

auto vmbr1
iface vmbr1 inet static
address 192.168.1.254
netmask 255.255.255.0
bridge_ports enp2s0
bridge_stp off
bridge_fd 0
#LAN

auto vmbr2
iface vmbr2 inet static
address 10.0.0.254
netmask 255.255.255.0
bridge_ports DMZ
bridge_stp off
bridge_fd 0
#Carte réseau virtuelle pour la DMZ
After rebooting ProxMox I'll try a ping on Google and get the following :
# ping www.google.fr
connect: Network is unreachable
And the result for ifconfig on ProxMox host gave the following :
enp1s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 9a:9c:de:26:62:5e txqueuelen 1000 (Ethernet)
RX packets 65730 bytes 90853020 (86.6 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 38048 bytes 3158366 (3.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 4e:03:cf:3d:a5:c1 txqueuelen 1000 (Ethernet)
RX packets 41039 bytes 4366256 (4.1 MiB)
RX errors 0 dropped 1 overruns 0 frame 0
TX packets 70498 bytes 98086586 (93.5 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Boucle locale)
RX packets 2494 bytes 949898 (927.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2494 bytes 949898 (927.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

tap100i0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST> mtu 1500
ether a6:7b:1e:e6:0a:2c txqueuelen 1000 (Ethernet)
RX packets 38035 bytes 2972338 (2.8 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 65735 bytes 90853378 (86.6 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

tap100i1: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST> mtu 1500
ether 32:85:bd:0b:c1:5b txqueuelen 1000 (Ethernet)
RX packets 68975 bytes 96769318 (92.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 38970 bytes 3569159 (3.4 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

tap100i2: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST> mtu 1500
ether 66:31:a3:e0:4c:e2 txqueuelen 1000 (Ethernet)
RX packets 4 bytes 388 (388.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 8 bytes 600 (600.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

vmbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet6 fe80::2ec:acff:fecf:1410 prefixlen 64 scopeid 0x20<link>
ether 9a:9c:de:26:62:5e txqueuelen 1000 (Ethernet)
RX packets 10 bytes 884 (884.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 13 bytes 1006 (1006.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

vmbr1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.1.254 netmask 255.255.255.0 broadcast 192.168.1.255
inet6 fe80::2ec:acff:fecf:1411 prefixlen 64 scopeid 0x20<link>
ether 4e:03:cf:3d:a5:c1 txqueuelen 1000 (Ethernet)
RX packets 2354 bytes 806524 (787.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1406 bytes 1302437 (1.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

vmbr2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.254 netmask 255.255.255.0 broadcast 10.0.0.255
inet6 fe80::7841:4dff:feea:c6b1 prefixlen 64 scopeid 0x20<link>
ether 66:31:a3:e0:4c:e2 txqueuelen 1000 (Ethernet)
RX packets 4 bytes 332 (332.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 16 bytes 1256 (1.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
 
Sorry for my late reply : the result is :
#ip route
192.168.1.0/24 dev vmbr1 proto kernel scope link src 192.168.1.254
when I restart ProxMox, all VM have internet connection, but not proxmox :
#ping 8.8.8.8
connect: The network is unreachable
when I execute dhclient on proxmox, I lost internet connection on the VM, but get ping 8.8.8.8 working but not ping on DNS www.google.fr.
If I execute ip route after the dhclient command I got (if I remember) the following
default 82.235.128.254
192.168.1.0/24
82.235.128.0/24
I've disabled my Box router function so I get my public IP directly on the ethernet connection
 
Last edited:
Add default gateway to Proxmox:
Code:
#ip route add default via 192.168.1.1
 
I'm so happy, it's work fine, and the traffic from ProxMox is throw my pfSense.
I really want to kiss you :)
 
  • Like
Reactions: kdbs
Hi from argentina!
I've Proxmox VE 7.0 and hasn't internet on host (The VM and CT yes have internet!)

My config:

Code:
ip route
default via 10.1.1.1 dev vmbr0 proto kernel onlink
10.1.1.0/24 dev vmbr0 proto kernel scope link src 10.1.1.229

Code:
cat /etc/network/interfaces
# 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 eno2
iface eno2 inet static
    address 10.1.1.229
    netmask 255.255.255.0
        gateway 10.1.1.1
    network 10.1.1.0
        broadcast 10.1.1.255

iface eno1 inet manual

iface eno3 inet manual

iface eno4 inet manual

auto vmbr0
iface vmbr0 inet static
    address 10.1.1.229/24
    gateway 10.1.1.1
    bridge-ports eno2
    bridge-stp off
    bridge-fd 0

Code:
 ls -al /etc/resolv.conf
-rw-r--r-- 1 root root 59 Feb 10 15:00 /etc/resolv.conf

root@pve:~# cat /etc/resolv.conf
search XXXX.XXX.XX
nameserver 8.8.8.8
nameserver 10.1.1.99
 
Having the same issue.

Code:
# 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

iface eno4 inet manual

iface eno3 inet manual

iface eno1 inet manual

iface eno2 inet manual

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

But when I ping google.com I get

Code:
root@aria:~# ping google.com
PING google.com (142.250.113.100) 56(84) bytes of data.
^C
--- google.com ping statistics ---
18 packets transmitted, 0 received, 100% packet loss, time 17400ms

root@aria:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
33 packets transmitted, 0 received, 100% packet loss, time 32765ms

My VMs can reach the internet, but not my Host machine, and i have no idea why.
 

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!