|
|
系统是redhat9.0,本机是单网卡,可以正常上网,ip是192.168.1.88,用squid代理其他电脑上网,vi /etc/squid/squid.conf
http_port 3128
cache_mem 16 MB
cache_swap_low 75
cache_swap_high 85
maximum_object_size 4096 KB
maximum_object_size_in_memory 8 KB
ipcache_size 1024
ipcache_low 90
ipcache_high 95
fqdncache_size 1024
cache_dir ufs /var/spool/squid 1000 16 256
cache_access_log /var/log/squid/access.log
cache_log /var/log/squid/cache.log
pid_filename /var/run/squid.pid
client_netmask 255.255.255.0
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hoursacl our_networks src 192.168.1.0/24
http_access allow our_networks
http_access allow localhost
http_access deny all
cache_mgr your_email
cache_effective_user squid
cache_effective_group squid
visible_hostname proxy
httpd_accel_host yourhost.yourdomain
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
保存后,启动squid
2.设定iptables规则
/sbin/iptables -t nat -A POSTROUTING -o eth0 -s 192.168.1.0/24 -j MASQUERADE
最后设置好客户端,但是打开网页出现以下错误/
ERROR
The requested URL could not be retrieved
While trying to retrieve the URL: http://www.google.com/
The following error was encountered:
* Access Denied.
Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.
Your cache administrator is your_email.
Generated Sun, 13 Apr 2003 13:34:52 GMT by proxy (squid/2.5.STABLE1)
请各位指点一下哪里不对,万分感谢.. |
|