
比如将内网的FTP服务器,映射到外网去,内网地址比如192.168.0.8:21 映射成外网比如2.2.2.2:22
可以用脚本来实现:
/ip firewall nat
chain=dstnat dst-address=2.2.2.2 protocol=tcp dst-port=22
action=dst-nat to-addresses=192.168.0.8 to-ports=21
也可以通过winbox里实现
在ip firewall nat里,添加一内NAT规则:
add chain=dstnat dst-address=外网地址 protocol=tcp dst-port=22action=dst-nat to-addresses=192.168.0.2 to-ports=21
效果如图
这样就可以了。记得左边图片里的那个端口是外网的,右边图片的是内网的