No internet connection in VM machine

fquirogam

New Member
Nov 13, 2015
2
0
1
Hi, I have a host server with a PROXMOX installation, then I've created a VM machine, but I can't reach an IP so far from my host machine.

This is my network configuration:
Code:
- HOST
  -vmbr0 with the Public IP

- vmbr1  

   auto vmbr1iface vmbr1 inet static
        address  192.168.0.254
        netmask  255.255.255.0
        bridge_ports vmbr0
        bridge_stp off
        bridge_fd 0
        post-up echo 1 > /proc/sys/net/ipv4/ip_foward
        post-up iptables -t nat -A POSTROUTING -s '192.168.0.0/24' -o vmbr0 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '192.168.0.0/24' -o vmbr0 -j MASQUERADE
        post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 2222 -j DNAT --to 192.168.0.1:22
        post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 2222 -j DNAT --to 192.168.0.1:22


- VM
  bridge with vmbr1
  IP 192.168.0.1
  netmask 255.255.255.0
  gateway 192.168.0.254

With this configuration I can ping the host public ip address, but i can't ping anyother external IP
 
Hi, I have a host server with a PROXMOX installation, then I've created a VM machine, but I can't reach an IP so far from my host machine.

This is my network configuration:
Code:
- HOST
  -vmbr0 with the Public IP

- vmbr1  

   auto vmbr1iface vmbr1 inet static
        address  192.168.0.254
        netmask  255.255.255.0
        bridge_ports vmbr0
        bridge_stp off
        bridge_fd 0
        post-up echo 1 > /proc/sys/net/ipv4/ip_foward
        post-up iptables -t nat -A POSTROUTING -s '192.168.0.0/24' -o vmbr0 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '192.168.0.0/24' -o vmbr0 -j MASQUERADE
        post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 2222 -j DNAT --to 192.168.0.1:22
        post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 2222 -j DNAT --to 192.168.0.1:22


- VM
  bridge with vmbr1
  IP 192.168.0.1
  netmask 255.255.255.0
  gateway 192.168.0.254

With this configuration I can ping the host public ip address, but i can't ping anyother external IP

I haven't studied your configuration beyond noticing that you are missing a new-line (return or linebreak) in the definitions for vmbr1. Just after "auto vmbr1" you should have a new line, yes? Again, I only gave this a cursory look, and am not able to comment on it further. Best of luck.
 
I haven't studied your configuration beyond noticing that you are missing a new-line (return or linebreak) in the definitions for vmbr1. Just after "auto vmbr1" you should have a new line, yes? Again, I only gave this a cursory look, and am not able to comment on it further. Best of luck.

actually, that is a typo error, in my configuration I have the new-line
 
Is that happening with the pve-firewall enabled? Have you tried disabling the firewall at datacenter level (and rebooting the host)?
 
  • Like
Reactions: Nadir
I solved it by disabling PVE firewall and Put dedicated IP address from my network. This setting was done in VM Operating System. I setup static IP in Windows which was installed in Virtual Machine and then i was able to access internet.
 

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!