Problem Internet connection Ubuntu 12.04 Server (trough VirtualBox)

6,171

Solution 1

You need to configure network card in VM for bridged network, not for NAT if u want to host server for ssh in Virtalbox. Maybe it will help: http://codesupply.net/content/setup-bridged-networking-virtualbox-ubuntu-1110

Solution 2

You can use Bridge Mode in VirtualBox settings so that the VM appears to be on the same level as the host machine. This allows it to act on the network as if it were physically connected to it. In the VM, set the network settings to autodetect over DHCP or if that doesn't work, get the default gateway from the host, give it that gateway, an unused IP address on that subnet(try a few that have the same first three numbers but a different last number) and also try giving the DNS servers 8.8.8.8 and 8.8.4.4.

Share:
6,171

Related videos on Youtube

Dilyan Nikolov
Author by

Dilyan Nikolov

Updated on September 18, 2022

Comments

  • Dilyan Nikolov
    Dilyan Nikolov over 1 year

    My final goal is to access my web projects trough external network.

    So, I have :

    • Internet connection trough wireless router (ISP's IPs are internal, so and the IPs which the router sets to my laptop too. I use DHCP on the router, not static IPs)
    • Ubuntu 12.04 Desktop installed.
    • VirtualBox with Ubuntu 12.04 Server installed.
    • While installation of Ubuntu Server, I'v choose to install SSH,Tomcat Server and Web server.

    The problem is that I don't know how to set a correct internet settings for Ubuntu Server. When I'm ping google's ip the response is :

    "Connect : Network unreachable"

    In VirtualBox's settings I'm choose NAT type, and for Port Forwarding :

    Host IP : 192.168.0.1 with port 2222

    Guest IP : 192.168.0.102 with port 22

    At least I want to be able to open my projects in the internal network,and then from an external network - the computers in the university.

    I think that I will have one more problem, because my IP's are not real. But when I'm able to open the projects from the internal network, then I will think about this problem.

    Sorry for my bad English and if I'm not explain my problem clearly.

  • nanofarad
    nanofarad over 11 years
    Welcome to Ask Ubuntu! Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
  • nanofarad
    nanofarad over 11 years
    You can edit your post to do so right now.