Setup Proxy Server

The attachment is the zip file for windows (I have tested it on windows 7. below steps is wriiten based on the test)
The steps:
1. unzip the file to c:\
2. change the file name in folder c:\squid\etc
mime.conf.default --> mime.conf
squid.conf.default --> squid.conf
cachemgr.conf.default --> cachemgr.conf
3. modify the c:\squid\etc\squid.conf
a. Change the network to your local network
Example
Before:
acl localnet src 10.0.0.0/8    # RFC1918 possible internal network
acl localnet src 172.16.0.0/12    # RFC1918 possible internal network
acl localnet src 192.168.0.0/16    # RFC1918 possible internal network
Change to:

acl localnet src 12.11.0.0/24   # RFC1918 possible internal network
#acl localnet src 172.16.0.0/12    # RFC1918 possible internal network
#acl localnet src 192.168.0.0/16    # RFC1918 possible internal network
b. Change the DNS ip address
Example
Before:
#    Example: dns_nameservers 10.0.0.1 192.172.0.4
Change to:
dns_nameservers 8.8.8.8
(When start service, the error 1067 come out, one possible reason is the dns setting got problem. You may the file c:\squid\var\logs\cache.log to find detail error information)
If there is no dns server to set, seting:
dns_testnames 0.0.0.0
c. Change http_port to the proxy ip address
Example: http_port 10.100.10.23:3128
4. open the command windows
5. go to the folder c:\squid\sbin
6. input command: squid.exe -i
The output should be:












7. input command: squid.exe -z
The output should be


8. go to the control panel/administrative tools/services start the service squid
9. check the status of service squid in taskmanager
10. open command windows, and input command: telnet 127.0.0.1 3128 to check the status of the port
11. in the client server, open command windows, and input command: telnet <proxy server ip> 3128 to check the status of the port
12. change the proxy setting in IE in the client server to check the result
13. If update the configuration file, need to reload configuration file. input command: squid.exe -k reconfigure
Additional
1. uninstall the software: squid.exe -r
2. If there is a upstream proxy you may add below sentence under http_port setting in the squid.conf file
never_direct allow all
cache_peer <parent IP address> parent <parent port> 7 no-query no-digest
Example:
never_direct allow all
cache_peer 10.100.10.250 parent 8080 7 no-query no-digest
3. block the client http visit
acl <tag> src <client ip>
http_access deny <tag>
Example
acl badclientip1 src 10.100.10.22
http_access deny badclientip1
4. block the website
acl <tag> url_regex -i <string of website>
http_access deny <tag>
Example
acl badurl url_regex -i google.com
http_access deny badurl

Comments

Popular posts from this blog

Nginx Proxy & Load Balance & LNMP

Snort+barnyard2+Snorby CentOS 6.5_64 Installation

ORACLE Error