双线负载后端口映射不正常
原本正常的端口隐射,在做了持续的负载均衡后,端口隐射失效,隐射的端口无法访问,请各位高手告诉我问题何在!我现在将持续的负载均衡的脚本内容发出来,请大家看看我的问题所在,我需要隐射的端口为80
/ ip address
add address=192.168.0.1/24 network=192.168.0.0 broadcast=192.168.0.255 interface=lan
add address=61.178.176.218/24 network=61.178.176.0 broadcast=61.178.176.255 interface=218
add address=61.178.176.165/24 network=61.178.176.0 broadcast=61.178.176.255 interface=165
注释:路由器的两个WAN口地址分别是61.178.176.218/24和61.178.176.165/24,LAN口的地址是192.168.0.1/24,内网网卡命名为lan
/ ip firewall mangle
add chain=prerouting src-address-list=odd in-interface=lan action=mark-connection \
new-connection-mark=odd passthrough=yes
add chain=prerouting src-address-list=odd in-interface=lan action=mark-routing \
new-routing-mark=odd
/ ip firewall mangle
add chain=prerouting src-address-list=even in-interface=lan action=mark-connection \
new-connection-mark=even passthrough=yes
add chain=prerouting src-address-list=even in-interface=lan action=mark-routing \
new-routing-mark=even
/ ip firewall mangle
add chain=prerouting in-interface=lan connection-state=new nth=1,1,0 \
action=mark-connection new-connection-mark=odd passthrough=yes
add chain=prerouting in-interface=lan action=add-src-to-address-list \
address-list=odd address-list-timeout=1d connection-mark=odd passthrough=yes
add chain=prerouting in-interface=lan connection-mark=odd action=mark-routing \
new-routing-mark=odd passthrough=no
/ ip firewall mangle
add chain=prerouting in-interface=lan connection-state=new nth=1,1,1 \
action=mark-connection new-connection-mark=even passthrough=yes
add chain=prerouting in-interface=lan action=add-src-to-address-list \
address-list=even address-list-timeout=1d connection-mark=even passthrough=yes
add chain=prerouting in-interface=lan connection-mark=even action=mark-routing \
new-routing-mark=even passthrough=no
add chain=prerouting in-interface=lan connection-state=new nth=1,1,1 \
src-address-list=!odd action=mark-connection new-connection-mark=even \
passthrough=yes
/ ip firewall nat
add chain=srcnat connection-mark=odd action=src-nat to-addresses=61.178.176.218 \
to-ports=0-65535
add chain=srcnat connection-mark=even action=src-nat to-addresses=61.178.176.165 \
to-ports=0-65535
注释:被标记为ODD的数据NAT为61.178.176.218 ,以EVEN为标记的数据NAT为61.178.176.165
/ ip route
add dst-address=0.0.0.0/0 gateway=61.178.176.1 scope=255 target-scope=10 routing-mark=odd
add dst-address=0.0.0.0/0 gateway=61.178.176.178 scope=255 target-scope=10 routing-mark=even
注释:被标记为ODD的数据用61.178.176.1为网关,同样,被标记为EVEN的数据从61.178.176.178这个网关出去。
/ ip route
add dst-address=0.0.0.0/0 gateway=61.178.176.178 scope=255 target-scope=10
注释:最后,没有做任何标记的数据从61.178.176.178这个网关出去,也是给路由器的一个默然网关。
[ 本帖最后由 笑看风云 于 2007-6-5 11:03 编辑 ] 你应该排除做 映射的 主机IP mangle是不是太复杂了:L 原帖由 crack_ros 于 2007-6-5 15:45 发表 http://bbs.routerclub.com/images/common/back.gif
你应该排除做 映射的 主机IP
如何去做,麻烦指点一二,谢谢了! :L :L 高手们,麻烦你们指点一下下吧~~ 这个方法有问题的
呵呵 免费的东西 ..........................;P 我也遇到了相同的问题~ 这个crack_ros从来都不告诉你解决问题的办法,只会讽刺,挖苦,别指望他了 原帖由 crack_ros 于 2007-6-8 17:14 发表 http://bbs.routerclub.com/images/common/back.gif
这个方法有问题的
呵呵 免费的东西 ..........................;P
这样的回答算什么意思? 我也是双线,不过我的映射一切正常。 我的也是不正常~~也在找解决方法~~~ 不要取笑我……看我的方法行不行:
以映射3389为例
----------------------------------------------------------------------------------
用winbox登录
ip->firewall->nat 添加一条规则(nat rule),在General项里
chain:dstnat
dst.address:(你的第一个外网ip)
protocol:6(tcp)
dst.port:3389
Action选项里
action:dat-nat
to address:(内网欲映射的ip)
to ports:3389
点ok完成一次规则添加
同样再添加一次规则,但General选项卡里,dst-address为你的另一个外网ip 上面这个做法好像不行 crack_ros 没发过一样有意义的东西,继续潜不知道多好,不知道上来干什么 不同的接口分配同网段的IP,固定IP情况下能正常工作?
页:
[1]
2