no internet for terminal- connect through a proxy

I'm using newly installed 13.04 on my lap. I've connected to wifi connection in our university and configured the proxy settings in network settings. I can access web and even software updater work nicely, but using the terminal I even can't ping into a website. "ping google.com" gives 100% packet loss


for me the following worked in our company network with proxy:

cd /etc/apt
mv ./apt.conf ./apt.conf.bak

this is to force the system to use the new file we create now.

cd ./etc/apt/apt.conf.d

create new file "95proxies" and add there the content of the apt.conf file Example:

Acquire::http::Proxy “http://proxy_url:proxy_port/”;
Acquire::ftp::Proxy “http://proxy_url:proxy_port/”;

now the system use the 95proxies file

Try

sudo apt-get update

this should work now


I had the same issues with the network at my university as well.

I believe that there is nothing wrong with your machine or the proxy server.

The problem is that the network admins block certain protocols and ports and only allow you to perform specific operations.

In your example, 'ping' doesn't work but lets say if you try 'ssh', you may have no issues at all.


If you use a proxy server, and want to access the Web through Terminal, you need to export the proxy variables.

To do that, just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

bash -c export http_proxy='http://proxy_username:password@proxy_ip:port/' 

Make sure you replace proxy_username, and password, with your information.

Another way is to: (from terminal)

cd etc/apt
sudo gedit apt.conf

This will open an empty document, just add the lines below, and save it

Acquire::http::Proxy “http://proxy_url:proxy_port/”;
Acquire::ftp::Proxy “http://proxy_url:proxy_port/”;