Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I installed Ubuntu linux distribution 10.04 on VirtualBox 4.2.12. The host os is windows 7. Now I want to do connect use wget. But the result is like:

wget www.google.com
Resolving www.google.com... 173.194.127.84, 173.194.127.80, 173.194.127.81, ...
Connecting to www.google.com|173.194.127.84|:80... failed: Connection timed out.
...
Connecting to www.google.com|173.194.127.83|:80... failed: Connection timed out.
Connecting to www.google.com|2404:6800:4005:801::1011|:80... failed: Network is unreachable.

But I can browse 173.194.127.84 using Firefox on linux. I just cannot figure that why I cannot use wget to connect to the Internet but can connect with Firefox? It is very strange. I want to know the reason why this thing happen.

BTW my host uses fixed IP to access to the Internet. I only have one IP to access to the Internet, so I'm using the NAT mode in VirtualBox.

share|improve this question
    
Do not you use a web proxy in the network? Do you see anything else than "No proxy" if you in Firefox open Edit > Preferences > Advanced > Network > Connection > Settings? What do you have there? Please check also the system proxy setting and the environment variable http_proxy (Run in command line: export http_proxy). –  pabouk Jul 22 '13 at 16:15
    
in Firefox Edit > Preferences > Advanced > Network > Connection > Settings, my setting is set as "Use system proxy setting". The command export http_proxy returns nothing. –  Marcus Thornton Jul 23 '13 at 3:19
    
Without http_proxy variable or appropriate command line option wget will not use a proxy. If you are not sure about requirement of a proxy setting in your network, please try to set Edit > Preferences > Advanced > Network > Connection > Settings in Firefox to "No proxy" and test if the same URLs which fail in wget can be accessed in Firefox. –  pabouk Jul 23 '13 at 10:41
    
In System > Preference > Network Proxy > Automatic Proxy Configuration I set to use a .pac file (e.g. myserver.com/proxy.pac ).Actually I have set Use system proxy setting in Firefox Edit > Preferences > Advanced > Network > Connection > Settings. I think I should set the http_proxy variable the .pac file. I've placed http_proxy=myserver.com/proxy.pac export http_proxy in .bashrc, but it didn't work. –  Marcus Thornton Jul 24 '13 at 3:16
    
OK, so it seems that the proxy is required in your network. Unfortunately you cannot use .pac files with http_proxy variable. They are too complicated. Please look into the proxy.pac file and try to find the proxy_address and proxy_port values. They are usually in this format: return "PROXY proxy_address:proxy_port";. Then set the http_proxy variable: export http_proxy=http://proxy_address:proxy_port. For testing you do not need to put this command into the shell startup scripts, just run it from the same command line from which you will run wget. –  pabouk Jul 24 '13 at 4:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.