我做了一个简单的squid.conf,如下
visible_hostname qq
http_port 192.168.1.144:3128
#acl local src 192.168.1.150/255.255.255.0
http_access allow all
#cache_dir ufs /usr/local/squid/cache 100 16 256
#cache_access_log /var/squid/logs/
cache_effective_user squid
cache_effective_group squid
cache_mem 8 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 4096 KB
maximum_object_size_in_memory 8 KB
ipcache_size 1024
ipcache_low 90
ipcache_high 95
fqdncache_size 1024
#dns_nameserver 210.96.198.96
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
然后 /usr/local/squid/sbin/squid -z就提示创建了cache
然后输入/usr/local/squid/sbin/squid -D就提示[root@magiclinux ~]# /usr/local/squid/sbin/squid start
2006/09/05 13:55:51| Squid is already running! Process ID 2903
接着设置好客户端电脑,其ip是192.168.1.150,想通过我的主机上网,但总是提示access control configuration prevents your request from being allowde at this time.pleasle contact your service provider if you feel this is incorrect。实在有点郁闷,参考了很多资料,当然也有很多概念和模糊,请教大家该怎么配置这个东东呢
我想了一下,这样改了:
http_access allow local
acl local src 192.168.1.150/255.255.255.0
但是不行阿,出现这个错误:
[root@magic~]# /usr/local/squid/sbin/squid NCd1
2006/09/05 17:12:35| aclParseIpData: WARNING: Netmask masks away part of the specified IP in '192.168.1.150/255.255.255.0'
2006/09/05 17:12:35| Squid is already running! Process ID 2480
[quote:0d5a32f821="leasle911"]我想了一下,这样改了:
http_access allow local
acl local src 192.168.1.150/255.255.255.0
但是不行阿,出现这个错误:
[root@magic~]# /usr/local/squid/sbin/squid NCd1
2006/09/05 17:12:35| aclParseIpData: WARNING: Netmask masks away part of the specified IP in '192.168.1.150/255.255.255.0'
2006/09/05 17:12:35| Squid is already running! Process ID 2480[/quote]
似乎要写成: acl local src 192.168.1.0/255.255.255.0