sealin 发表于 2012-5-3 10:25:49

批量添加ros端口映射脚本有问题,求高手修改,谢谢

:for sheng from=10 to=99 do={/ip firewall nat add action=dst-nat \
chain=dstnat disabled=no dst-address-type=local dst-port=(580 . $sheng) \
protocol=tcp to-addresses=(192.168.77. . $sheng) to-ports=59111}

目的是批量添加端口580XX,到ip 192.168.77.XX的端口59111

请教这个脚本有什么问题,麻烦高手修改一下,十分感谢

sealin 发表于 2012-5-3 10:26:38

我复制到命令行界面运行,返回错误,改过好多次,还是不行,实在头大了

sealin 发表于 2012-5-3 10:32:39

:for sheng from=10 to=99 do={/ip firewall nat add action=dst-nat chain=dstnat disabled=no dst-address-type=local dst-port=("580" . $sheng) protocol=tcp to-addresses=("192.168.88." . $sheng) to-ports=59898}

额,自己解决了,格式问题,呵呵,放在这如果其他人看到,希望能有所帮助:lol

sealin 发表于 2012-5-21 22:30:50

bobwalker 发表于 2012-5-3 13:14 static/image/common/back.gif
支持一下。

老师技术水平很高,可是服务费用也很高
在你那配置的多线路端口映射很满意
希望能够帮忙解决下vpn的配置问题,不知道可以优惠点不
页: [1]
查看完整版本: 批量添加ros端口映射脚本有问题,求高手修改,谢谢