Install Windows 7 on Kimsufi Proxmox VM 5 : no internet on VM

Entretoize

New Member
Oct 13, 2019
8
0
1
42
Hello, I installed "Proxmox VM 5 os" on my kimsufi server, then I created a Window 7 virtual machine selecting VirtIO (paravirtualized) for the network (vmbr0).
But there's no internet on the vm.
After reading some tutorial I created a second linux bridge adding that in interfaces :
Code:
auto vmbr2
#private sub network
iface vmbr2 inet static
        address  192.168.1.1
        netmask  255.255.255.0
        bridge_ports none
        bridge_stp off
        bridge_fd 0

        post-up   iptables -t nat -A POSTROUTING -s '192.168.1.0/24' -o vmbr1 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '192.168.1.0/24' -o vmbr1 -j MASQUERADE

And set the ipv4 properties in the vm with ip 192.168.1.2, and windows seemed to recognize the network asking if it was home or professionnal network, but that changed nothing and still have no internet connexion.
I don't need the machine to be accessible from outside using rdp or something else, but I need it to have access to the internet.

Thanks for any help.
 
Sure, here it is :

Code:
# The loopback network interface
auto lo
iface lo inet loopback


# vmbr0: Bridging. Make sure to use only MAC adresses that were assigned to you.
auto vmbr0
iface vmbr0 inet static
        address 91.12X.XXX.XXX/24
        gateway 91.12X.XXX.254
        bridge_ports enp4s0
        bridge_stp off
        bridge_fd 0

auto vmbr2
#private sub network
iface vmbr2 inet static
        address  192.168.1.1
        netmask  255.255.255.0
        bridge_ports none
        bridge_stp off
        bridge_fd 0

        post-up   iptables -t nat -A POSTROUTING -s '192.168.1.0/24' -o vmbr1 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '192.168.1.0/24' -o vmbr1 -j MASQUERADE
 
so replace

Code:
 post-up   iptables -t nat -A POSTROUTING -s '192.168.1.0/24' -o vmbr1 -j MASQUERADE
 post-down iptables -t nat -D POSTROUTING -s '192.168.1.0/24' -o vmbr1 -j MASQUERADE

by

Code:
 post-up   iptables -t nat -A POSTROUTING -s '192.168.1.0/24' -o vmbr0 -j MASQUERADE
 post-down iptables -t nat -D POSTROUTING -s '192.168.1.0/24' -o vmbr0 -j MASQUERADE
 

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!