# Problem with APT behind the proxy

**URL:** <https://community.ipfire.org/t/problem-with-apt-behind-the-proxy/12991>\
**Category:** Web Proxy, URL Filter & Update Accelerator\
**Created:** [8 October 2024 13:10 UTC](https://community.ipfire.org/t/problem-with-apt-behind-the-proxy/12991 "2024-10-08T13:10:26Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![williste](https://community.ipfire.org/user_avatar/community.ipfire.org/williste/32/11418_2.png) [@williste](https://community.ipfire.org/u/williste)\
**Post date:** [8 October 2024 13:10 UTC](https://community.ipfire.org/t/problem-with-apt-behind-the-proxy/12991/1 "2024-10-08T13:10:26Z")

</div>

Hello to the community!  
I’m encountering a strange issue with the proxy server.  
I am using a RED + GREEN configuration with a parent proxy on RED and IPS disabled.  
Web traffic with authentication on the parent proxy works perfectly; however, APT does not work at all.  
The Ubuntu machines in the GREEN network are correctly configured to use APT, I’m sure of that. I believe the issue is with my proxy.  
After running the command _sudo apt install ntpdate_, I get the following line in the _/var/log/squid/access.log_ file:  
`4766.384 30016 192.168.0.11 NONE_NONE_ABORTED/000 0 GET http://fr.archive.ubuntu.com/ubuntu/pool/universe/n/ntp/ntpdate_4.2.8p15%2bdfsg-1ubuntu2_amd64.deb - HIER_NONE/- -`  
If I enter the following URL in a browser: `http://fr.archive.ubuntu.com/ubuntu/pool/universe/n/ntp/`, the connection works fine without authentication, and if I download a tar file, everything works as expected. However, downloading a `.deb` file doesn’t work!  
Does anyone have an idea how to resolve this blocking issue?  
Thank you very much for your suggestions!

---

<div class="post-metadata">

**Author:** ![williste](https://community.ipfire.org/user_avatar/community.ipfire.org/williste/32/11418_2.png) [@williste](https://community.ipfire.org/u/williste)\
**Post date:** [8 October 2024 15:32 UTC](https://community.ipfire.org/t/problem-with-apt-behind-the-proxy/12991/2 "2024-10-08T15:32:18Z")

</div>

Hi, To clarify my previous post, the content filters and file extension filters are not enabled!  
Below is an example in the _/var/log/squid/access.log_ file: of manually downloading a `.deb` file and a `.tar.xz` file from the same site.

 ![Proxy](https://community.ipfire.org/uploads/default/original/2X/5/53b2761b8e878e5400b28bb2eee46b2fce42dba2.png)  
Thank you very much for your suggestions!

---

<div class="post-metadata">

**Author:** ![hvacguy](https://community.ipfire.org/user_avatar/community.ipfire.org/hvacguy/32/8576_2.png) [@hvacguy](https://community.ipfire.org/u/hvacguy)\
**Post date:** [8 October 2024 16:23 UTC](https://community.ipfire.org/t/problem-with-apt-behind-the-proxy/12991/3 "2024-10-08T16:23:51Z")

</div>

> [@williste](#):
>
> parent proxy on RED and IPS disabled.

Are you sure IPS is not on?  
Look in The IPS rules and turn off the ones pertaining to APT.

---

<div class="post-metadata">

**Author:** ![williste](https://community.ipfire.org/user_avatar/community.ipfire.org/williste/32/11418_2.png) [@williste](https://community.ipfire.org/u/williste)\
**Post date:** [9 October 2024 07:33 UTC](https://community.ipfire.org/t/problem-with-apt-behind-the-proxy/12991/4 "2024-10-09T07:33:57Z")

</div>

Hi,  
Yes, IPS appears to be stopped!  
 ![suricata](https://community.ipfire.org/uploads/default/original/2X/7/7e8c6f555fa7e8b3f25c3937f673e833d16d0d5b.png)

 ![proxy2](https://community.ipfire.org/uploads/default/original/2X/d/dc1ffa792d6785f3378bbd04f5af70b924fb42aa.png)  
 ![proxy3](https://community.ipfire.org/uploads/default/original/2X/5/566f1fd65e80a4e7b29deab864ab4a113f4435c1.png)

No filtering url and file extensions!

 ![proxy4](https://community.ipfire.org/uploads/default/original/2X/e/efd3c006799ad830e3f6612e21f59d11999d3112.png)

Any ideas?

Thanks for your suggestions!

---

<div class="post-metadata">

**Author:** ![hvacguy](https://community.ipfire.org/user_avatar/community.ipfire.org/hvacguy/32/8576_2.png) [@hvacguy](https://community.ipfire.org/u/hvacguy)\
**Post date:** [9 October 2024 09:33 UTC](https://community.ipfire.org/t/problem-with-apt-behind-the-proxy/12991/5 "2024-10-09T09:33:27Z")

</div>

> [@Web Proxy and apt-get](https://community.ipfire.org/t/web-proxy-and-apt-get/8307):
>
> Not sure why the web proxy is blocking services like “apt” Web Proxy is enabled on Green, Transparent proxy is disabled. Can’t update a linux box doing sudo apt updateget blocked - connect (111: Connection refused) Cannot initiate the connection Could not connect to archive.raspberrypi.org:80 (46.235.231.151). - connect (111: Connection refused) Cannot initiate the connection to archive.raspberrypi.org:80 When I shutdown Web proxy service, issues resolve immediately., URL Filter Log is …

Perhaps this may help.

---

<div class="post-metadata">

**Author:** ![arne\_f](https://community.ipfire.org/user_avatar/community.ipfire.org/arne_f/32/12760_2.png) [@arne\_f](https://community.ipfire.org/u/arne_f)\
**Post date:** [9 October 2024 10:30 UTC](https://community.ipfire.org/t/problem-with-apt-behind-the-proxy/12991/6 "2024-10-09T10:30:55Z")

</div>

Is the update accelerator enabled? If yes try to disable it.

---

<div class="post-metadata">

**Author:** ![williste](https://community.ipfire.org/user_avatar/community.ipfire.org/williste/32/11418_2.png) [@williste](https://community.ipfire.org/u/williste)\
**Post date:** [9 October 2024 10:36 UTC](https://community.ipfire.org/t/problem-with-apt-behind-the-proxy/12991/7 "2024-10-09T10:36:04Z")

</div>

Thank you very much @hvacguy for your response. I had read that post before posting mine, but it didn’t help me…

---

<div class="post-metadata">

**Author:** ![williste](https://community.ipfire.org/user_avatar/community.ipfire.org/williste/32/11418_2.png) [@williste](https://community.ipfire.org/u/williste)\
**Post date:** [9 October 2024 12:39 UTC](https://community.ipfire.org/t/problem-with-apt-behind-the-proxy/12991/8 "2024-10-09T12:39:47Z")

</div>

Thank you very much @arne_f , it works correctly now!!!  
But why?  
Is disabling the update accelerator detrimental to performance if I have many computers (\>100) on the green area using the proxy?

---

<div class="post-metadata">

**Author:** ![arne\_f](https://community.ipfire.org/user_avatar/community.ipfire.org/arne_f/32/12760_2.png) [@arne\_f](https://community.ipfire.org/u/arne_f)\
**Post date:** [9 October 2024 12:55 UTC](https://community.ipfire.org/t/problem-with-apt-behind-the-proxy/12991/9 "2024-10-09T12:55:44Z")

</div>

The accelerator should cache some \*.deb files on the IPFire disc at first download and should use the cache if a second client try to fetch the same file.

I fear this is buggy with the currect squid version. Looks like we loose the next proxy feature…

---

<div class="post-metadata">

**Author:** ![bbitsch](https://community.ipfire.org/user_avatar/community.ipfire.org/bbitsch/32/7420_2.png) [@bbitsch](https://community.ipfire.org/u/bbitsch)\
**Post date:** [9 October 2024 13:13 UTC](https://community.ipfire.org/t/problem-with-apt-behind-the-proxy/12991/10 "2024-10-09T13:13:42Z")

</div>

The Update Accelerator is in fact detrimental, if many computers load different files. I don’t remember how exactly the identity of downloads is determined. An item consists of download URL and file name. If the URL or name differs for different clients, each download is made twice ( for the cache and for the client ). These downloads happen simultanious!

---

<div class="post-metadata">

**Author:** ![williste](https://community.ipfire.org/user_avatar/community.ipfire.org/williste/32/11418_2.png) [@williste](https://community.ipfire.org/u/williste)\
**Post date:** [9 October 2024 13:43 UTC](https://community.ipfire.org/t/problem-with-apt-behind-the-proxy/12991/11 "2024-10-09T13:43:24Z")

</div>

Thank you for your responses! I was stuck on this APT issue for a few days! I’m glad to see that the community is so efficient!
