/ip firewall nat add chain=dstnat dst-address-type=local protocol=tcp dst-port=外网端口 action=dst-nat to-address=内网IP to-port=内网端口
/ip firewall nat add chain=srcnat src-address=192.168.XX.0/24(内网网段) dst-address=内网IP protocol=tcp dst-port=内网端口 out-interface=bridge action=masquerade

此时,在内网和外网环境均可以使用域名+端口的方式访问内网服务,其中域名通过DDNS解析到动态公网IP.
评论区