Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Squid Proxy Server
- --------------------
- #yum install squid
- #vi /etc/squid/squid.conf
- http_port 8080
- cache_mem 100 MB
- cache_dir /../../
- acl NetA src 172.10.0.1/24
- acl NetB src 172.19.1.1/24
- http_access allow NetA
- http_access allow NetB
- dns_nameservers 8.8.8.8 8.8.4.4
- always_direct allow NetA NetB
- never_direct allow NetA NetB
- cache_peer 2.2.2.2 parent 4040 0 default no-query /*if use 2 step proxy*/
- /*NCSA_users config*/
- #htpasswd -c /etc/squid/passwd username
- #chmod o+r /etc/squid/passwd
- #rpm -ql squid | grep ncsa_auth
- #vi /etc/squid/squid.config
- auth_param basic program /usr/lib64/squid/ncsa_auth /etc/squid/passwd
- auth_param basic children 5
- auth_param basic realm Squid proxy-caching web server
- auth_param basic credentialsttl 2 hours
- auth_param basic casesensitive off
- acl ncsa_users proxy_auth REQUIRED
- http_access allow ncsa_users
- /*banning domains*/
- acl ban_domains dstdomain .facebook.com .youtube.com
- http_access deny CONNECT ban_domains /*CONNECT for https*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement