NAT: VM gets no connection to the Internet

Rootinator

Member
May 1, 2019
23
0
21
55
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: