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
3 Answers
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
-
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– dedunuMar 22, 2018 at 15:47
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.
-
I finally found out that they have blocked most of the ports except for http, https etc :(– SudheeraDec 19, 2013 at 4:34
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/”;
-
I get this message -> sudo: export: command not found I tried it without sudo, then it gives no errors but no effect.– SudheeraJun 16, 2013 at 10:18
-
-
-
-
@Mitch, you forgot the almighty root!
cd /etc/apt/
=). Also, it would be weird if this worked, becauseapt.conf
is for theapt
suite, right?– Alaa AliJun 18, 2013 at 6:05
ping
command? There should be aReply from (<IP Address>): Destination network unreachable
kind of message. Also, let's trytraceroute -n google.com
and tell us what the output is (I think you'll first need tosudo apt-get install traceroute
to installtraceroute
).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 * * *