2

Iam unable to get internet connection inside guest(ubuntu) in virtual box although host(WinXP) has an internet connection. Tried with Nat: In Ubuntu it shows Wired connection connected but unable to browse sites.

Tried with Bridged adapter: In ubuntu it shows that wired connection is not connected.

Yes I use a proxy

I just appended the lines in the file.

"In the window that opens add the following lines modifying as appropriate to the file" can you explain what appropriate is. I am still not able to get connected to internet.

Ravindra
  • 25
  • 2
Ravindra
  • 21
  • 1
  • 2

2 Answers2

3

Step 1:

Open a terminal CTRL+ALT+T and enter

sudo -i; 

You are now logged in as root so have the permissions required to save the files. Keep the terminal open. Type:

gedit /etc/environment

In the window that opens add the following lines modifying as appropriate to the file. By which I mean your proxy is probably not called myproxy.server.com:8080 use the proxy settings from your windows machine.

http_proxy=http://myproxy.server.com:8080/
https_proxy=http://myproxy.server.com:8080/
ftp_proxy=http://myproxy.server.com:8080/
no_proxy="localhost,127.0.0.1,localaddress,.localdomain.com"
HTTP_PROXY=http://myproxy.server.com:8080/
HTTPS_PROXY=http://myproxy.server.com:8080/
FTP_PROXY=http://myproxy.server.com:8080/
NO_PROXY="localhost,127.0.0.1,localaddress,.localdomain.com"

Save and close gedit.

Internet should now be working (next time you reboot) but you won't get any updates to fix this in the terminal you opened before type

gedit /etc/apt/apt.conf.d/95proxies

A new window will open add the following lines modifying as appropriate

Acquire::http::proxy "http://myproxy.server.com:8080/";
Acquire::ftp::proxy "ftp://myproxy.server.com:8080/";
Acquire::https::proxy "https://myproxy.server.com:8080/";

Save then close the terminal and reboot. All should now work as expected.

Warren Hill
  • 22,112
  • 28
  • 68
  • 88
1

I normally use Bridged. Do you have DHCP enabled in the network settings, so the VM gets an IP-address from the router or dhcp-server? Click the network icon and then Connection Information. See what IP-address the machine has. Is it on the same network as the host? If it's like 192.168.1.xx, can you ping to 192.168.1.1 (if the router has that address)? When I can't browse the internet, it normally means I use NAT for the VM, and it's IP-address is in the 10.x.x.x range. Unless your local network uses the same range, this means you have a local network for host-guest only.

SPRBRN
  • 2,315
  • 6
  • 28
  • 35