Mikrotik RouterOS单拨端口映射脚本

By | 2020年5月11日

/ip firewall nat
add chain=dstnat protocol=tcp dst-port=5000-5001 action=dst-nat to-addresses=192.168.1.201 to-ports=5000-5001 comment="Webstation"
add chain=dstnat protocol=tcp dst-port=9025-9040 action=dst-nat to-addresses=192.168.1.201 to-ports=9025-9040 comment="videostation"
add chain=dstnat protocol=tcp dst-port=1900 action=dst-nat to-addresses=192.168.1.201 to-ports=1900 comment="cloudkey"
add chain=dstnat protocol=tcp dst-port=6690 action=dst-nat to-addresses=192.168.1.201 to-ports=6690 comment="cloudstaton"
add chain=dstnat protocol=tcp dst-port=5005-5006 action=dst-nat to-addresses=192.168.1.201 to-ports=5005-5006 comment="webdav"
add chain=dstnat protocol=tcp dst-port=7281 action=dst-nat to-addresses=192.168.1.201 to-ports=443 comment="photostation"

自定变量:
dst-port="外网端口"
to-addresses="内网IP"
to-ports="内网端口"
comment="备注名称"

0