Internet access problem in Terminal using proxy server network connection


Internet access problem in Terminal using proxy server network connection

When we use different internet connection in one laptop, and if one of those connections is proxy server network connection, then we may have a problem with accessing internet in Ubuntu Software Center and in Terminal.

In direct connection we haven’t any problem with internet access. But when we switch to proxy connection, at first everything is ok, internet works in Gnome.(firefox and all applications can take access from GNOME). But Terminal and Software Center gives connection error. We can do this simple action in Terminal.

Open Terminal or press Ctrl + Alt + T and type the following commands.

Step 1

Navigate to /etc/apt directory using

cd /etc/apt

Internet access problem in Terminal using proxy server network connection 1


Step 2

Create or modify apt.conf file in /etc/apt directory

sudo gedit apt.conf

Internet access problem in Terminal using proxy server network connection 2


Step 3

Then we see this document empty. So we write in it:

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

Please type the above 2 line commands using keyboard itself. Because if you copy this command from webpage then there may be a chance of copying unwanted data from the webpage.


Step 4

We save it and close. That’s all, internet access has been restored in Terminal and in Ubuntu Software Center.
If the problem still exits then restart the system.


 

You can leave a response, or trackback from your own site.

Leave a Reply