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

5
  • 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, 2013 at 1: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, 2013 at 5:48
  • Okay, maybe try this one?: stackoverflow.com/questions/1039057/…
    – Steven K
    Jun 18, 2013 at 6: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, 2013 at 9: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, 2013 at 7:07

3 Answers 3

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

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, 2018 at 15:47
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.

1
  • I finally found out that they have blocked most of the ports except for http, https etc :(
    – Sudheera
    Dec 19, 2013 at 4:34
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/”;
6
  • I get this message -> sudo: export: command not found I tried it without sudo, then it gives no errors but no effect.
    – Sudheera
    Jun 16, 2013 at 10:18
  • Try the new command, and let me know.
    – Mitch
    Jun 16, 2013 at 10:36
  • I tried but no luck :(
    – Sudheera
    Jun 18, 2013 at 5:48
  • Try what I've added in my answer, and let me know.
    – Mitch
    Jun 18, 2013 at 6:01
  • @Mitch, you forgot the almighty root! cd /etc/apt/ =). Also, it would be weird if this worked, because apt.conf is for the apt suite, right?
    – Alaa Ali
    Jun 18, 2013 at 6:05

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .