How do I get my Proxmox VM to access the internet without a public IP address
22,581
Solution 1
You have to use NAT (network address translation/masquerading) to provide private IPv4 addresses for your virtual machines. The Proxmox wiki has instructions on how to set this up.
Or you can just go get IPv6; your ISP will probably be more than happy to give it to you (if they have it yet).
Solution 2
I followed the advice of micael hampton and was able to fix it by:
1: copy /etc/network/interfaces' to
/etc/network/interfaces.new'
2: add the following code to my local ip interface at vmbr0:1
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '192.168.100.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '192.168.100.0/24' -o vmbr0
Related videos on Youtube
Comments
-
DiverseAndRemote.com about 1 year
I would like to create a proxmox vm and have that vm be able to ping/access external websites without having to assign a public ip to it. How do I do this?
The VM is running centos 6
-
Deb about 11 yearsThis is w-a-y too general to be answered. On what are you running (or intend to run) the VM? What kind of Internet access does whatever it is have access to?
-
Paul about 11 yearsA public IP is all that normal external websites will talk to. Even if you share it with thousands of other devices through address translation, your VM will need to appear at a public IP.
-
DiverseAndRemote.com about 11 years@sysadmin1138 The VM is running centos 6
-
-
Michael Hampton about 11 yearsBe sure to ask your ISP or hosting provider for IPv6. :)