Find the answer to your Linux question:
Results 1 to 6 of 6
Hi to all, Im still new to Linux. Im running ubuntu on virtualbox and I have a dynamic public IP assigned by my ISP. I have set my networking on ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2011
    Posts
    3

    Change private IP to public


    Hi to all, Im still new to Linux.

    Im running ubuntu on virtualbox and I have a dynamic public IP assigned by my ISP.
    I have set my networking on my ubuntu virtualbox to NAT so that i would have internet.
    I installed apache web server and when I entered ifconfig on the terminal, it showed that eth0 has an address of 10.0.2.15. I tried to access my localhost using the address of 10.0.2.15 and it works fine.

    Now my problem is how can i change my private IP which is 10.0.2.15 to into apublic address so that I can access it outside. Do any of you guys have idea on how will i be able to do this? Any help is appreciated, thank you. I am using a modem, no router.

  2. #2
    Just Joined!
    Join Date
    Jul 2010
    Posts
    13
    Change the NAT Configuration to Bridge on virtual box

  3. #3
    Just Joined!
    Join Date
    Apr 2011
    Posts
    3
    When I selected the config to Bridged Adapter it gives me an error that no bridged adapter is selected.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Apr 2011
    Posts
    3
    I fixed the installation of my vb and its now fixed..

    but the problem now is i dont have internet connection with Bridge..

  6. #5
    Just Joined!
    Join Date
    Jul 2010
    Posts
    13
    what you mean with the bridge ... you dont have internet connection in your virtual host machine? maybe you have to set the IP static on you Virtual host maching

  7. #6
    Linux Engineer Kloschüssel's Avatar
    Join Date
    Oct 2005
    Location
    Italy
    Posts
    773
    If you don't have a physical network card dedicated to one specific vm, the favorite way to do such things is:

    internet <=> vm-host <=NAT=> vm

    Thus one would have to configure vm-host's NAT to map requests to the vm. This is also the place to distribute requests across several vm's (most common algorithm is round-robin).

    If you have a physical network card dedicated to one specific vm, you could omit the NAT and talk to the vm just like any other real/physical machine. This solution suits best situations where many requests occur simultaneously. The reason for this is, that the vm-host doesn't have to keep tcp connections open and thus become a possible bottleneck.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •