- 论坛徽章:
- 0
|
经过多个其它防火墙测试,的确是Squid的问题,其的几个防火墙(ipf,ipfw也不行)。也许不是UDP问题,但的确导致了upd无法访问,下面是配置:
squid.conf
visible_hostname proxy_243
http_port 127.0.0.1:3128 transparent
cache_mem 512 MB
cache_dir ufs /usr/local/squid/cache 2048 16 256
emulate_httpd_log on
logformat combined %>a %ui %un [%tl] "%rm %ru HTTP/%rv" %Hs %<st "%{Referer}>h" "%{User-Agent}>h" %Ss:%Sh
cache_access_log /usr/local/squid/logs/access.log combined
cache_log /usr/local/squid/logs/cache.log
cache_store_log none
logfile_rotate 60
cache_swap_low 90
cache_swap_high 95
maximum_object_size 2048 KB
maximum_object_size_in_memory 1024 KB
acl all src 0.0.0.0/0.0.0.0
acl int_net src 192.168.16.0/24
http_access allow int_net
http_access deny all
===============================ipf.conf============================
#
# +------------------+ +---------------------+ +------------------+
# | Internet Network |---| fxp0 NAT+IPF em0 |---| Internal Network |
# +------------------+ +---------------------+ +------------------+
#
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# Interface: all
# Block all incoming and outgoing packets unless they're allowed later.
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# block all frist
block in all
block out all
# packets with ip-options, short and fragmented packets
block in quick all with short
block in quick all with ipopts
block in quick all with frag
block in quick all with opt lsrr
block in quick all with opt ssrr
# disable nmap scan
block in quick on fxp0 proto tcp from any to any flags FUP
block in quick on fxp0 proto tcp from any to any flags SF/SFRA
block in quick on fxp0 proto tcp from any to any flags /SFRA
# Local network traffic is allowed
pass out quick on lo0
pass in quick on lo0
pass in quick on em0
pass out quick on em0
# The pass rules to enable Services
pass in on fxp0 proto icmp from any to any icmp-type echo
pass in on fxp0 proto tcp from any to any port = 20 flags S keep state
pass in on fxp0 proto tcp from any to any port = 21 flags S keep state
pass in on fxp0 proto tcp from any to any port = 22 flags S keep state
pass in on fxp0 proto tcp from any to any port = 80 flags S keep state
pass in on fxp0 proto tcp from any to any port = 443 flags S keep state
pass in on fxp0 proto tcp from any to any port 55000 >< 55100 flags S keep state
# The general pass rules.
pass out quick on fxp0 proto tcp from any to any flags S/SAFR keep state keep frags
pass out quick on fxp0 proto udp from any to any keep state keep frags
pass out quick on fxp0 proto icmp from any to any keep state keep frags
#==============================ipnat.conf===========================
#
# +------------------+ +---------------------+ +------------------+
# | Internet Network |---| fxp0 NAT+IPF em0 |---| Internal Network |
# +------------------+ +---------------------+ +------------------+
#
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#map fxp0 192.168.100.0/16 -> x.y.z.u/32 proxy port ftp ftp/tcp
map fxp0 192.168.100.0/16 -> x.y.z.u/32 portmap tcp/udp auto
map fxp0 192.168.100.0/16 -> x.y.z.u/32
rdr em0 0.0.0.0/0 port 80 -> 127.0.0.1 port 3128
#==============================ipnat.conf=========================== |
|