- 论坛徽章:
- 0
|
开启squid后,无法打开网页,大家帮忙看看,希望得到大家的意见和方法,谢谢/
[root@dehuang init.d]# /sbin/iptables-save
# Generated by iptables-save v1.3.1 on Thu May 4 22:41:19 2006
*filter
:INPUT DROP [414:33105]
:FORWARD DROP [6:782]
:OUTPUT ACCEPT [220:38477]
:syn-flood - [0:0]
-A INPUT -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -j syn-flood
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m tcp --dport 21 -j ACCEPT
-A INPUT -p tcp -m multiport --dports 110,80,25,22,139,21,20 -j ACCEPT
-A INPUT -s 192.168.2.0/255.255.255.0 -p udp -m udp --dport 53 -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 8 -m limit --limit 5/sec -j ACCEPT
-A INPUT -p icmp -m icmp --icmp-type 8 -j DROP
-A INPUT -p icmp -j ACCEPT
-A FORWARD -p tcp -m iprange --src-range 192.168.2.42-192.168.2.80 -m tcp --dport 8000 -j DROP
-A FORWARD -p udp -m iprange --src-range 192.168.2.42-192.168.2.80 -m udp --dport 53 -m string --string "tencent" -j DROP
-A FORWARD -p udp -m iprange --src-range 192.168.2.42-192.168.2.80 -m udp --dport 53 -m string --string "TENCENT" -j DROP
-A FORWARD -p tcp -m iprange --src-range 192.168.2.42-192.168.2.80 -m multiport --dports 80,8000,21,20,110,25 -j DROP
-A FORWARD -m ipp2p --kazaa --edk --bit -j DROP
-A FORWARD -p tcp -m ipp2p --ares -j DROP
-A FORWARD -p udp -m ipp2p --kazaa -j DROP
-A FORWARD -m string --string "sex.com" -j REJECT --reject-with icmp-port-unreachable
-A FORWARD -m string --hex-string "|c9abc7e9b5e7d3b0|" -j REJECT --reject-with icmp-port-unreachable
-A FORWARD -m string --hex-string "|bca4c7e9cdbcc6ac|" -j REJECT --reject-with icmp-port-unreachable
-A FORWARD -m string --hex-string "|b5e7d3b0|" -j REJECT --reject-with icmp-port-unreachable
-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -s 192.168.2.0/255.255.255.0 -p tcp -m multiport --dports 1863,443 -j ACCEPT
-A FORWARD -d 202.96.128.68 -m iprange --src-range 192.168.2.1-192.168.2.40 -j ACCEPT
-A FORWARD -s 192.168.2.0/255.255.255.0 -p udp -m udp --dport 53 -j ACCEPT
-A FORWARD -p tcp -m iprange --src-range 192.168.2.1-192.168.2.40 -m multiport --dports 110,80,25,21,20,443,1863,8000 -j ACCEPT
-A syn-flood -p tcp -m limit --limit 3/sec --limit-burst 6 -j RETURN
-A syn-flood -j REJECT --reject-with icmp-port-unreachable
COMMIT
# Completed on Thu May 4 22:41:19 2006
# Generated by iptables-save v1.3.1 on Thu May 4 22:41:19 2006
*nat
:PREROUTING ACCEPT [263:17702]
:POSTROUTING ACCEPT [4:613]
:OUTPUT ACCEPT [3:514]
-A POSTROUTING -s 192.168.2.0/255.255.255.0 -o ppp0 -j MASQUERADE
COMMIT
# Completed on Thu May 4 22:41:19 2006
下面是我的squid的配置文件
http_port 3128
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
cache_mem 40 MB
cache_dir ufs /var/spool/squid 1000 16 256
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl CONNECT method CONNECT
http_access allow all
http_access allow manager localhost
http_access deny manager
# Deny requests to unknown ports
http_access deny !Safe_ports
# Deny CONNECT to other than SSL ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access allow all
http_reply_access allow all
icp_access allow allhttpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
coredump_dir /var/spool/squid
[ 本帖最后由 platinum 于 2006-5-5 08:42 编辑 ] |
|