-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

3
  • 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, 2012 at 2: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, 2012 at 2:38
  • @sysadmin1138 The VM is running centos 6 Oct 20, 2012 at 2:39

2 Answers 2

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

2
  • Giving this a try and rebooting now. Hope it works Oct 20, 2012 at 3:00
  • Be sure to ask your ISP or hosting provider for IPv6. :) Oct 20, 2012 at 4:13
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.