-1

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

DiverseAndRemote.com
  • 2,011
  • 3
  • 15
  • 16
  • This 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? – sysadmin1138 Oct 20 '12 at 02:24
  • A 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. – Paul Oct 20 '12 at 02:38
  • @sysadmin1138 The VM is running centos 6 – DiverseAndRemote.com Oct 20 '12 at 02:39

2 Answers2

2

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).

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940
1

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
DiverseAndRemote.com
  • 2,011
  • 3
  • 15
  • 16