No internet access on windows VM with Local IP on Hetzner Dedicated Server

pksh71

Member
May 24, 2018
1
0
6
39
Hi
I am trying to run a windows 7 virtual Machines with Local IP on Hetzner Dedicated Server with Internet access.
But my windows VM has no internet acess.

My Network Configurations area as follows:


### Hetzner Online GmbH installimage

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback
iface lo inet6 loopback

auto eno1
iface eno1 inet static
address 144.76.96.23
netmask 255.255.255.224
gateway 144.76.96.1
# route 144.76.96.0/27 via 144.76.96.1
up route add -net 144.76.96.0 netmask 255.255.255.224 gw 144.76.96.1 dev eno1

iface eno1 inet6 static
address 2a01:4f8:192:3116::2
netmask 64
gateway fe80::1

auto vmbr0
iface vmbr0 inet static
address 144.76.96.23
netmask 255.255.255.255
bridge_ports none
bridge_stp off
bridge_fd 0
bridge_maxwait 0
pre-up brctl addbr vmbr0

iface vmbr0 inet6 static
address 2a01:4f8:192:3116::2
netmask 64

auto vmbr1
iface vmbr1 inet static
address 10.10.10.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.10.10.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o vmbr0 -j MASQUERADE
 
Hi
I am trying to run a windows 7 virtual Machines with Local IP on Hetzner Dedicated Server with Internet access.
But my windows VM has no internet acess.

My Network Configurations area as follows:


### Hetzner Online GmbH installimage

source /etc/network/interfaces.d/*

auto lo
iface lo inet loopback
iface lo inet6 loopback

auto eno1
iface eno1 inet static
address 144.76.96.23
netmask 255.255.255.224
gateway 144.76.96.1
# route 144.76.96.0/27 via 144.76.96.1
up route add -net 144.76.96.0 netmask 255.255.255.224 gw 144.76.96.1 dev eno1

iface eno1 inet6 static
address 2a01:4f8:192:3116::2
netmask 64
gateway fe80::1

auto vmbr0
iface vmbr0 inet static
address 144.76.96.23
netmask 255.255.255.255
bridge_ports none
bridge_stp off
bridge_fd 0
bridge_maxwait 0
pre-up brctl addbr vmbr0

iface vmbr0 inet6 static
address 2a01:4f8:192:3116::2
netmask 64

auto vmbr1
iface vmbr1 inet static
address 10.10.10.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.10.10.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.10.10.0/24' -o vmbr0 -j MASQUERADE

Don't know where the VM's virtual NIC is assigned to - probably vmbr1 (it should be). Then the question is what is vmbr0 good for? Note address 144.76.96.23 is defined twice, the assignment to vmbr0 is u useless ( as well as "up route add -net 144.76.96.0 netmask 255.255.255.224 gw 144.76.96.1 dev eno1") and should have no effect but it may have a negative impact to routing.
 

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!