FB7-PF-SQUID做反向代理,squid无法启动[已解决]

2009-05-13 14:15:12来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折

pf 把公网卡IP的80转到内网卡的squid80
squid 启动不来,cache.log提示:commBind: Cannot bind socket FD 13 to 172.168.0.115:80: (13) Permission denied

(实验目的) internetuser --》Freebsd-Wan-PF --》Freebsd-Lan-Squid --》 web1.web2.web3..webN (因公网IP只有一个,web全在私网)

原来是非ROOT用户不能占用1024下端口,用root启动,问题解决了。感谢乔楚大哥帮助解决!感谢哈尔滨啤酒!

pf配置:
wan_if="rl0"
lan_if="rl1"
inter_net="172.168.0.0/24"
web_server="172.168.0.115"
scrub in on $wan_if
#Nat
nat on $wan_if from $inter_net to any -> ($wan_if)
#http
rdr on $wan_if proto tcp from any to 222.28.44.215 port 80 -> $web_server port 80
pass all

squid配置:
# NETWORK OPTIONS
# -----------------------------------------------------------------------------
http_port 172.168.0.115:80 vhost vport
icp_port 0
cache_peer 172.168.0.115 parent 81 0 no-query originserver

# OPTIONS WHICH AFFECT THE NEIGHBOR SELECTION ALGORITHM
# -----------------------------------------------------------------------------
hierarchy_stoplist cgi-bin ?
hierarchy_stoplist -i ^https:\\ ?
acl QUERY urlpath_regex -i cgi-bin \? \.asp \.php \.jsp \.cgi \.aspx
acl denyssl urlpath_regex -i ^https:\\
no_cache deny QUERY
no_cache deny denyssl

# OPTIONS WHICH AFFECT THE CACHE SIZE
# -----------------------------------------------------------------------------
cache_mem 60 MB
cache_swap_low 90
cache_swap_high 95
maximum_object_size 4096 KB
maximum_object_size_in_memory 80 KB
# dns cache
ipcache_size 1024
ipcache_low 90
ipcache_high 95
fqdncache_size 1024

# LOGFILE PATHNAMES AND CACHE DIRECTORIES
# -----------------------------------------------------------------------------
cache_dir ufs /usr/www/cache 1024 56 256
access_log /usr/local/etc/squid/logs/access.log
cache_log /usr/local/etc/squid/logs/cache.log
#cache_store_log /usr/local/etc/squid/logs/store.log
emulate_httpd_log on
pid_filename /usr/local/etc/squid/logs/squid.pid

# ACCESS CONTROLS
# -----------------------------------------------------------------------------
acl all src 0.0.0.0/0.0.0.0
acl localhost src 127.0.0.1/255.255.255.255
acl mydomain dstdomain jyjs.hebei.com.cn
acl mynet src 172.168.0.0/24
http_access allow localhost
http_access allow mydomain
http_access allow mynet
http_access deny all
icp_access deny all


# ADMINISTRATIVE PARAMETERS
# -----------------------------------------------------------------------------
cache_mgr dierock@sina.com
cache_effective_user squid
cache_effective_group squid
visible_hostname www.hebei.com.cn

# MISCELLANEOUS
# -----------------------------------------------------------------------------

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:[来自网络,有需要的看看]freebsd.device.driver.slides

下一篇:KLD的基本操作