LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Can't use apt-get over a squid proxy, error 503 (https://www.linuxquestions.org/questions/linux-software-2/cant-use-apt-get-over-a-squid-proxy-error-503-a-4175581661/)

fjleon 06-07-2016 09:54 AM

Can't use apt-get over a squid proxy, error 503
 
I have debian 7 and am trying to update to debian 8.
The box has internet access, but i want it to use another internet connection (that i have on my windows desktop) because it's faster.

So i installed squid 3.5 on windows, and used the following line in the debian box:

export http_proxy=http://192.168.x.x:3128

used lynx to visit a site and it's working, and i see the squid logs just fine.

However, when using apt-get update i get all bunch of 503 service unavailable errors. The squid logs show up the following:

1465309775.842 0 192.168.x.x TCP_MISS/503 4133 GET http://security.debian.org/dists/jes...ces.diff/Index - HIER_NONE/- text/html

Since apt-get uses http on port 80, it shouldn't be denied by squid.

Here's my squid config:

Code:

acl localnet src 192.168.0.0/16
acl CONNECT method CONNECT
http_access allow localhost manager
http_access deny manager
http_access allow localnet
http_access allow localhost
http_port 3128
coredump_dir /var/cache/squid
refresh_pattern ^ftp:                1440        20%        10080
refresh_pattern ^gopher:        1440        0%        1440
refresh_pattern -i (/cgi-bin/|\?) 0        0%        0
refresh_pattern .                0        20%        4320
dns_nameservers 8.8.8.8 208.67.222.222
dns_v4_first on
max_filedescriptors 3200

Anyone has an idea on what to do?

jefro 06-09-2016 07:30 PM

It used to be that you had to edit apt-get config file to set proxy as it sometimes didn't use the global settings correctly.

Don't think it should but may be an issue with dns port 53. Edit hosts file for the sites needed on update maybe to see if it is the problem.

fjleon 06-10-2016 06:41 AM

no, the problem is squid itself. I downloaded a simple binary proxy for windows and it worked flawlessly without any config at all. And i did configure squid correctly, since i was able to browse to www pages normally from the linux cli.

It should have worked, since deb packages are downloaded from http port 80 like a regular site


All times are GMT -5. The time now is 03:23 AM.