打开winbox客户端登陆之后,找到“ip”--”firewall”防火墙设置,找到防火墙规则,nat里面点击“+”添加规则
设置端口映射(外网)
在一般“general”菜单中, Chain选择 dstnat ,协议protocl默认6 tcp即可。 DST port是目标端口就是外网端口,接着是入口in interface选择上网的公网接口。
设置端口映射(内网)
action选项设置,选择dst-nat
选好之后,出现的地址to address里面也就是需要映射的服务器的IP地址,
然后是内网端口号
回流(其实意思就是你访问外网的端口,重新回到内网IP的端口上)
也是ip-firewall-+
chain:dstnat,dst-address:外网IP地址,protocl默认6tcp,dst-port:外网端口,in interface:lan
action,dst-nat,to-add:内网IP,端口:内网端口
转载于:https://blog.51cto.com/481814/1624918