网络结构为:一台linux服.务器,双网卡,一块接大.网,一块接局域网,接大网网卡有固定的大网IP 汽车
实现目标:当大网用户访问该liunx服务器的大网IP时,直接转向到局域网的另一台.W.EB服务器上 建材
参照以前的帖子:
假定内IP提供服务的主机IP为1.1.1..1,提.供互联网代理的主机外网IP为2.2.2.2.
/s.bin/iptables. -t nat -A POSTROUTING -s 1.1.1.1 -o eth0 -j SN.AT --to 2.2.2.2( 游戏 )
/sbin/iptables -t nat -A PR.EROUTIN.G -p tcp -d 2.2.2.2 --dport 80 -i eth0 -j DNAT --to .1.1.1.1.
结果出现错误:
ERROR
The requeste.d URL .could not be retrieved.
--.---.-------------------------------------------------------------------------.----- 印刷
While trying .to r.etrieve the URL: / .
The following.. error was encountered: 服务器
Invalid URL
Some aspect of the requested URL is incorr.ec.t. Possible problems: .
Missing or incorrect access protocol (should be `http://'' or similar) 美容
Mis.sing hostname 投资
Illeg.al double-.escape in the URL-Path 虚拟主机
Illegal character in hostname; underscores are n.ot. allowed .
You.r cache adminis.trator is root. 健康
---------.---------------------------------.--.------------------------------------.
Generated Mo.n, 22 Jan 2007 01:13:37 GMT by localh.ost (Squid/2.4.STABLE7) 外汇
请问是什么原因?
squid如下:
visib.le_hostna.me localhost 汽车
http_port 80
cache_m.em 76 MB 女人
c.ache_swap_low 80健康
ca.che_swap_high 95电脑
hierarchy_sto.plist cgi-bin. ?.
half_closed_.clients off 婚庆
hierarchy_stoplist .-i ^h.ttps:\\ ?电影
acl QUERY urlpath_rege.x -i cgi-bin \? \.asp \.php \.jsp. \.cgi域名
acl denyssl urlpath_rege.x -i .^https:\\外贸
no_c.ache deny QUERY.
no_cache deny d.enyssl
ipca.che_size 1024 鲜花
ipcache_low 90
ipc.ache_high 95 婚庆
fqdncache._size 1024( 游戏 )
ftp_user .Squid@外贸
ftp_passive on
acl all src. 0.0.0.0/0..0.0.0投资
acl localhost src 127..0.0.1/255.255.255.255.( 游戏 )
acl manager proto cach.e_obj.ect 乙肝
acl Sa.fe_.ports port 80 # http( 游戏 )
acl Safe_ports p.ort 21 #. ftp学习
acl Safe_.ports port 443 563 # ht.tps, snews
acl Saf.e_ports port 70 # go.pher<性病>
a.c.l Safe_ports port 210 # wais虚拟主机
#acl Safe_ports port 1025-.65535 # unregiste.red ports外贸
acl Safe._ports port 280 # http-mg.mt<性病>
acl. Safe_ports port 488 # gss-.http.
a.cl Saf.e_ports port 591 # filemaker健康
a.cl Safe_ports port 777 # multiling. http 鲜花
http_access .deny .!Safe_ports电影
acl .SSL_ports port 443 5.63 8601投资
acl CONNECT met.hod .CONNECT 电子
# Deny CONNECT. to othe.r than SSL ports 建材
h.ttp_access deny CONNECT !.SSL_ports教育
# Only allow .cachemgr access from localh.ost<性病>
htt.p_access allow manager loc.alhost 电子
htt.p_access deny manager.
http_.access allow localhos.t.
# And finally deny all other. access. to this proxy 乙肝
#never_direct allo.w all( 游戏 )
acl. ken src 1.1.1.2.
http_acce.ss allow ken 健康
http_access de.ny all.
icp_a.ccess allow all 杀毒