3

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

Sudheera
  • 220
  • First, what is your question? All you've given is a series of facts. What's wrong? Do you want to ping google.com? No proxy will help you with that. – Steven K Jun 17 '13 at 01:58
  • I want to pull a source using 'bzr'. but it complains about not having internet connection. Then I tried pinging google. then I realized even that is not working. – Sudheera Jun 18 '13 at 05:48
  • Okay, maybe try this one?: http://stackoverflow.com/questions/1039057/how-do-i-use-bazaar-with-a-http-proxy – Steven K Jun 18 '13 at 06:28
  • I think that, since you're in a university, they might be blocking ICMP (ping) packets. Were you able to ping before, on Windows perhaps or any other machine? What is the complete output of the ping command? There should be a Reply from (<IP Address>): Destination network unreachable kind of message. Also, let's try traceroute -n google.com and tell us what the output is (I think you'll first need to sudo apt-get install traceroute to install traceroute). – Alaa Ali Jun 18 '13 at 09:20
  • traceroute output :

    `traceroute to google.com (74.125.236.97), 30 hops max, 60 byte packets

    1 10.8.108.254 2.687 ms 20.577 ms 20.742 ms 2 192.248.8.62 6.150 ms 7.613 ms 9.987 ms 3 192.168.100.1 10.132 ms 18.938 ms 19.579 ms 4 192.168.100.6 19.812 ms 20.852 ms 21.386 ms 5 192.248.8.125 21.666 ms 22.230 ms 23.575 ms 6 * * * 7 * * * `

    – Sudheera Jun 19 '13 at 07:07

3 Answers3

3

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.

koullislp
  • 206
  • 1
  • 7
3

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

bernhard
  • 46
  • 1
  • Updating apt.conf will make sure apt-get can access internet through the proxy. But you have to set http_proxy environment variable for other terminal applications to use the proxy – dedunu Mar 22 '18 at 15:47
2

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/”;
Mitch
  • 107,631