NAT: VM gets no connection to the Internet

Rootinator

Member
May 1, 2019
23
0
21
54
Hello,

my created in Proxmox VM gets over NAT no connection to the Internet.

I have statically configured the IPv4 in the VM and assigned a local IPv4 (10.0.0.10) in the VM.

According to "ip addr" it has the assigned IPv4.

Network card from the VM in Proxmox:
Code:
Bridge: vmbr1
Model: VirtIO (paravirtualized)
VLAN tag: No VLAN

/etc/network/interfaces (host):
Code:
auto vmbr1
iface vmbr1 inet static
        address  10.0.0.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 '10.0.0.1/24' -o vmbr0 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '10.0.0.1/24' -o vmbr0 -j MASQUERADE

I can not ping the host from the VM (10.0.0.1).

What do I have to configure in Proxmox so that the VM can access the Internet?
 
Last edited:

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!