Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERR_ACCESS_DENIED: No access by default #59

Open
kenorb opened this issue May 20, 2019 · 3 comments · May be fixed by #60
Open

ERR_ACCESS_DENIED: No access by default #59

kenorb opened this issue May 20, 2019 · 3 comments · May be fixed by #60

Comments

@kenorb
Copy link

kenorb commented May 20, 2019

I've run container with docker run sameersbn/squid command, noted the IP with docker inspect X.

However, when I'm trying to test with curl it reads ERR_ACCESS_DENIED.

$ export http_proxy=http://172.17.0.3:3128
$ curl http://example.com/
...
<!-- ERR_ACCESS_DENIED -->
...

Is it possible to configure container to have the allow access by default? Or what's the easiest way to achieve that?

kenorb added a commit to kenorb-contrib/docker-squid that referenced this issue May 20, 2019
@kenorb kenorb linked a pull request May 20, 2019 that will close this issue
@ro31337
Copy link

ro31337 commented Jul 6, 2019

Yes, that's super confusing. WTF? I need clear message that it is unusable by default.

@mt-kelvintaywl
Copy link

Here is how I copied out the default config file from the image and modified it to allow for all

# Assuming we are running a non-configured / default Squid container as `squid`
docker run --name squid -d sameersbn/squid:3.5.27-2

docker cp squid:/etc/squid/squid.conf ./squid.conf.default

sed 's/http_access deny all/http_access allow all/' ./squid.conf.default > ./squid.conf 

You'd then just need to mount this config file as a volume when running the container

@beeman
Copy link

beeman commented Feb 9, 2020

Thanks @mt-kelvintaywl, thats a great way to do it.

I wanted to use this in a custom Docker image without having to copy along the squid.conf, I ended up using it like this:

FROM sameersbn/squid:3.5.27-2

RUN cp /etc/squid/squid.conf /etc/squid/squid.conf.default && \
    sed 's/http_access deny all/http_access allow all/' \
    /etc/squid/squid.conf.default > /etc/squid/squid.conf

@mahdi-ln mahdi-ln mentioned this issue Feb 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants