squid.conf代理
我做了一个简单的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就提示# /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。实在有点郁闷,参考了很多资料,当然也有很多概念和模糊,请教大家该怎么配置这个东东呢 加一行
acl all src 0.0.0.0/0.0.0.0 有道理,的确要定义下,试一哈,先谢了 我想了一下,这样改了:
http_access allow local
acl local src 192.168.1.150/255.255.255.0
但是不行阿,出现这个错误:
# /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 我想了一下,这样改了:
http_access allow local
acl local src 192.168.1.150/255.255.255.0
但是不行阿,出现这个错误:
# /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
似乎要写成: acl local src 192.168.1.0/255.255.255.0
或者:acl local src 192.168.1/255.255.255.0 真的,squid正常运行无报错了,但不明白,我是希望ip地址为192.168.1.150的电脑通过我的主机代理上网,怎么要写成192.168.1.0呢?还有阿192.168.1.150无法通过我正常上网,怎么会事,请教阿!!! 到服务器区去问,你问错地方了。 真的,squid正常运行无报错了,但不明白,我是希望ip地址为192.168.1.150的电脑通过我的主机代理上网,怎么要写成192.168.1.0呢?还有阿192.168.1.150无法通过我正常上网,怎么会事,请教阿!!!
若只是希望192.168.1.150,好像就应该之间写成:192.168.1.150,不带掩码
若硬要加上掩码的话,写成:192.168.1.150/255.255.255.255
页:
[1]