Skip to content

Instantly share code, notes, and snippets.

@mlesaout
Forked from salrashid123/squid.conf
Created May 21, 2021 10:10
Show Gist options
  • Save mlesaout/edb19acf4a4f53006ebced31e1c6218e to your computer and use it in GitHub Desktop.
Save mlesaout/edb19acf4a4f53006ebced31e1c6218e to your computer and use it in GitHub Desktop.
Minimal squid.conf to deny destination host
1) create a file squid.conf
```
acl denydomain dstdomain .bbc.com
http_access deny denydomain
acl allowdomain dstdomain .yahoo.com
http_access allow allowdomain
http_access deny all
http_port 3128
access_log /apps/squid/var/logs/access.log squid
cache_log /apps/squid/var/logs/cache.log squid
```
2) then run the squid-proxy image i setup and reference the file via volume:
# docker run -v `pwd`:/tmp/squid/ -p 3128:3128 -t salrashid123/squidproxy /apps/squid/sbin/squid -NsY -f /tmp/squid/squid.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment