No internet in terminal and not able to download packages

Discussions about using Linux guests in VirtualBox.
Post Reply
ash123
Posts: 4
Joined: 20. Jan 2017, 13:55

No internet in terminal and not able to download packages

Post by ash123 »

I have problems connecting to internet in Linux mint 18.1 serena installed in Virtualbox. I am using windows 7 as host.
I have setup network adaptor as 'Bridged Adaptor' and am able to connect when i tried using firefox.but when tried in terminal or when used synaptic package manager, it fails hinting that machine is not connected to internet. Tried the below command and still not able to connect to internet.host os is configured to resolve DNS automatically.
VBoxManage modifyvm "VMName" --natdnshostresolver1 on

Any help would be appreciated.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: No internet in terminal and not able to download packages

Post by mpack »

This question appears to have no relevance in "Windows Hosts". Please choose a forum which is appropriate for your question.

Moving this to Linux Guests.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: No internet in terminal and not able to download packages

Post by Perryg »

Since natdnshostresolver1 on only applies to VBox NAT mode there is no surprise that it has no effect when using bridged.
Do you have a router? Have you tried VBox NAT instead?
ash123
Posts: 4
Joined: 20. Jan 2017, 13:55

Re: No internet in terminal and not able to download packages

Post by ash123 »

i am very novice to virtual box and i want to setup virtual box in bridged adapter so that i can access applications deployed in vbox from outside.I am not sure if this is possible with VBox NAT. But my real problem is that i am not able to access internet using terminal and synaptic package manager fails though i am able to connect to internet in a browser.
I am connecting to my office lan and is connected via router.
If i can achieve my req using VBox nat , i can do that and share the results.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: No internet in terminal and not able to download packages

Post by Perryg »

It sounds like your office LAN is not allowing you to connect and are using a proxy instead of a true bridge. Have you talked to your IT folks to see if they allow you to use a second bridge connection?
Can you ping 8.8.8.8 from the terminal on the guest?
ash123
Posts: 4
Joined: 20. Jan 2017, 13:55

Re: No internet in terminal and not able to download packages

Post by ash123 »

ping shows "DESTINATION HOST UNREACHABLE". It is connected using proxy.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: No internet in terminal and not able to download packages

Post by Perryg »

A terminal has no way to know you are using a proxy server and you must tell it. Try using one of the examples below and modify it to your proxy server settings.
This should allow you to use the proxy during the current session, but you will need to either run that each time you open a terminal or add it to your environment variables. Also I don't see you being able to access your apps from anywhere but the guest since proxy services don't really handle that well.
ash123
Posts: 4
Joined: 20. Jan 2017, 13:55

Re: No internet in terminal and not able to download packages

Post by ash123 »

My office network use automatic configuration script and i have the *.dat , so how could i use this file to set proxy in guest.i am unaware of the exact proxy address to use.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: No internet in terminal and not able to download packages

Post by Perryg »

You are going to need to get your IT department involved in fixing this. They are the ones that have set the proxy and control what they allow on their network. Not a VirtualBox issue to resolve I am afraid.
Post Reply