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.
Best Answer
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.