Virtualbox: Is it possible to get a different public-ip on the guest system from host's public-ip?

5,471

Solution 1

If you set the virtual network card connection to be "Bridged" rather than "NAT" then you can set the IP address in the virtual machine to the same format as the host machine.

Examples (assuming you do the above):

  • Host: DHCP (e.g., 192.168.1.x)
  • Virtual: DHCP
  • Result: Virtual will have a 192.168.1.x address
  • Host: Manually set (e.g., 10.1.1.1)
  • Virtual: Manually set (10.1.1.2)
  • Result: host can connect to virtual via 10.1.1.2
  • End result is that any machine on the network would be able to connect to the virtual machine via its own IP address and you wouldn't need to configure anything to map across to it

    Hope this helps

    Dave

    Solution 2

    This is not possible, in a home environment, no matter the operating-system or virtualization.

    The issue is: both (or all machines) on this home-network are leaving through the router to access the internet. The router is the one machine, that actually has the public ip, everything else is available through translated addresses (NAT).

    There would be at least two ways to achieve the wanted situation:

    1. Use a VPN on one of the machines, so it "leaves" the internal network at another place.

    2. Get a second internet-line, and assign the router of this line as the gateway for the other machine.

    Share:
    5,471

    Related videos on Youtube

    Admin
    Author by

    Admin

    Updated on September 18, 2022

    Comments

    • Admin
      Admin over 1 year

      i'd like to set my guest's public-ip (windows xp) undependent from the host's ip as a different one. Is it possible? If so, how do i do it?

      Please note that, it's about the public id, not the local ones..

      Thank you very much..

    • Admin
      Admin over 12 years
      Hi, but i want to change my public -ip not the local one. I still got the same public ip adress after that changes...
    • Admin
      Admin over 12 years
      Once you configure the virtual network card as "bridged", you can think of it as another physical machine on your network. Therefore, whatever you did to expose the public IP address of the host machine would need to be done for the virtual machine also I would imagine.
    • vgoff
      vgoff over 11 years
      I don't think downloading the proxy and using it would change their web-facing IP though.
    • Admin
      Admin almost 2 years
      Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.