关于IPchains

关于IPchains

我本来想用squid作代理。但现在完全没作用。我的ipchains只加了这两句,就可以使网内的机器都能上网QQ,收发邮件,浏览网页:
-A forward -s 192.168.0.0/24 -j MASQ
-A input -s 192.168.0.0/24 80 -j REDIRECT 8080 -p tcp

我的squid已经设置好透明代理,而且几天前还代理得好好的,现在失效了,看access.log时只有前几天的记录。
      
用ps -A|grep squid
查看squid 是否已经启动,
如果没启动,就用
/etc/rc.d/init.d/squid restart
重启。
还有看一下你firewall的规则,
很多同志都是加了包可以出去,但是忘了让它返回。      
firewall的规则:
-A input -s 192.168.0.0/24 80 -j REDIRECT 8080 -p tcp
-A forward -s 192.168.0.0/24 -j MASQ
我有两台机,一样的设置,为什么这台就不行呢。squid也起来了,cache.log是这样的:帮我看看是哪里错了。
2002/02/04 16:25:52| Starting Squid Cache version 2.4.STABLE3 for i686-pc-linux-gnu...
2002/02/04 16:25:52| Process ID 2442
2002/02/04 16:25:52| With 1024 file descriptors available
2002/02/04 16:25:52| Performing DNS Tests...
FATAL: ipcache_init: DNS name lookup tests failed.
Squid Cache (Version 2.4.STABLE3): Terminated abnormally.
CPU Usage: 0.010 seconds = 0.010 user + 0.000 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 313
2002/02/04 16:26:36| Starting Squid Cache version 2.4.STABLE3 for i686-pc-linux-gnu...
2002/02/04 16:26:36| Process ID 2449
2002/02/04 16:26:36| With 1024 file descriptors available
2002/02/04 16:26:36| Performing DNS Tests...
FATAL: ipcache_init: DNS name lookup tests failed.
Squid Cache (Version 2.4.STABLE3): Terminated abnormally.
CPU Usage: 0.010 seconds = 0.010 user + 0.000 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 313
2002/02/04 16:27:19| Starting Squid Cache version 2.4.STABLE3 for i686-pc-linux-gnu...
2002/02/04 16:27:19| Process ID 2526
2002/02/04 16:27:19| With 1024 file descriptors available
2002/02/04 16:27:19| Performing DNS Tests...
2002/02/04 16:27:19| Successful DNS name lookup tests...
2002/02/04 16:27:19| DNS Socket created on FD 4
2002/02/04 16:27:19| Adding nameserver 192.168.0.9 from squid.conf
2002/02/04 16:27:19| Unlinkd pipe opened on FD 9
2002/02/04 16:27:19| Swap maxSize 307200 KB, estimated 23630 objects
2002/02/04 16:27:19| Target number of buckets: 1181
2002/02/04 16:27:19| Using 8192 Store buckets
2002/02/04 16:27:19| Max Mem  size: 40960 KB
2002/02/04 16:27:19| Max Swap size: 307200 KB
2002/02/04 16:27:19| Rebuilding storage in /usr/local/squid/cache (CLEAN)
2002/02/04 16:27:19| Using Least Load store dir selection
2002/02/04 16:27:19| Set Current Directory to /usr/local/squid/cache
2002/02/04 16:27:19| Loaded Icons.
2002/02/04 16:27:19| Accepting HTTP connections at 0.0.0.0, port 8080, FD 10.
2002/02/04 16:27:19| Accepting ICP messages at 0.0.0.0, port 3130, FD 11.
2002/02/04 16:27:19| WCCP Disabled.
2002/02/04 16:27:19| Ready to serve requests.
2002/02/04 16:28:36| Done scanning /usr/local/squid/cache swaplog (0 entries)
2002/02/04 16:28:36| Finished rebuilding storage from disk.
2002/02/04 16:28:36|         0 Entries scanned
2002/02/04 16:28:36|         0 Invalid entries.
2002/02/04 16:28:36|         0 With invalid flags.
2002/02/04 16:28:36|         0 Objects loaded.
2002/02/04 16:28:36|         0 Objects expired.
2002/02/04 16:28:36|         0 Objects cancelled.
2002/02/04 16:28:36|         0 Duplicate URLs purged.
2002/02/04 16:28:36|         0 Swapfile clashes avoided.
2002/02/04 16:28:36|   Took 77.7 seconds (   0.0 objects/sec).
2002/02/04 16:28:36| Beginning Validation Procedure
2002/02/04 16:28:37|   Completed Validation Procedure
2002/02/04 16:28:37|   Validated 0 Entries
2002/02/04 16:28:37|   store_swap_size = 84k
2002/02/04 16:28:38| storeLateRelease: released 0 objects      
配置文件有问题嘛,

你看到这句了吗?
2002/02/04 16:27:19| With 1024 file descriptors available      
squid.conf  的http_access设为deny了,  但是现在还有个问题,我已经设置为透明代理,但现在只能把浏览器设置代理服务,并用8080端口才可以通过squid上网;如果不设置就不行了。估计ipchains没设好,但又不知哪里有错,还望指点。
我的ipchains如下:
-A input -s 192.168.0.0/24 80 -j REDIRECT 8080 -p tcp
-A forward -s 192.168.0.0/24 -j MASQ      
这一句是什么意思来着?  

With 1024 file descriptors available      
squid.conf中至少要有如下设置:
httpd_accel_host virtual
httpd_accel_port 80  
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
FIREWALL应该没问题
还有你要注意如果你要做透明代理的话,
客户机的网关必须指向该代理!!!!!


With 1024 file descriptors available
这句是第1024行描述有错误