MikroTik RouterOS 多拨群晖NAS端口映射配置脚本

By | 2020年3月30日

/ip firewall nat
add action=masquerade chain=srcnat src-address=192.168.1.0/24 dst-address=192.168.1.0/24 out-interface=lan
add chain=dstnat src-address=!1.1.1.0/24 dst-address=!1.1.1.1 protocol=tcp dst-port=5000-5001 action=dst-nat to-addresses='nas IP' to-ports=5000-5001 comment="Web_Server"
add chain=dstnat src-address=!1.1.1.0/24 dst-address=!1.1.1.1 protocol=tcp dst-port=9025-9040 action=dst-nat to-addresses='nas IP' to-ports=9025-9040 comment="Video_Server"
add chain=dstnat src-address=!1.1.1.0/24 dst-address=!1.1.1.1 protocol=tcp dst-port=6690 action=dst-nat to-addresses='nas IP' to-ports=6690 comment="Cloud_Server"
add chain=dstnat src-address=!1.1.1.0/24 dst-address=!1.1.1.1 protocol=tcp dst-port=1900 action=dst-nat to-addresses='nas IP' to-ports=1900 comment="Cloud_Key"
add chain=dstnat src-address=!1.1.1.0/24 dst-address=!1.1.1.1 protocol=tcp dst-port=7364 action=dst-nat to-addresses='nas IP' to-ports=7364 comment="Music_player"
add chain=dstnat src-address=!1.1.1.0/24 dst-address=!1.1.1.1 protocol=tcp dst-port=7380 action=dst-nat to-addresses='nas IP' to-ports=7380 comment="Rss"
add chain=dstnat src-address=!1.1.1.0/24 dst-address=!1.1.1.1 protocol=tcp dst-port=7443 action=dst-nat to-addresses='nas IP' to-ports=443 comment="Photo_Server"
add chain=dstnat src-address=!1.1.1.0/24 dst-address=!1.1.1.1 protocol=tcp dst-port=8096 action=dst-nat to-addresses='nas IP' to-ports=8096 comment="Jellyfin_Server"

0