ROS软路由论坛 ROSABC.com 网络方案网络工程交流

 找回密码
 会员注册

QQ登录

只需一步,快速开始

查看: 7657|回复: 2

[交流] ROS软路由 ADSL拨号方式上网端口映射,

[复制链接]
发表于 2008-2-18 01:41:39 | 显示全部楼层 |阅读模式

马上注册成为ROSABC会员,随时发帖回复。

您需要 登录 才可以下载或查看,没有账号?会员注册

x
先用WINBOX登陆管理ROS软路由
在 SYSTEM-SCRIPTS中添加2个脚本
add-nat(名称)
——————————————————————————
#script add-nat
:log info "Add-Nat: Sending Dynamic NAT update Begin"
/ip firewall nat add chain=dstnat dst-address=[ /ip address get [/ip address find interface=pppoe-out] address ] protocol=tcp dst-port=80 action=dst-nat to-addresses=192.168.0.25 to-ports=80 comment="WEB"
/ip firewall nat add chain=dstnat dst-address=[ /ip address get [/ip address find interface=pppoe-out] address ] protocol=tcp dst-port=110 action=dst-nat to-addresses=192.168.0.25 to-ports=110 comment="POP"
/ip firewall nat add chain=dstnat dst-address=[ /ip address get [/ip address find interface=pppoe-out] address ] protocol=tcp dst-port=25 action=dst-nat to-addresses=192.168.0.25 to-ports=25 comment="SMTP"
:log info "Add-Nat: Sending Dynamic NAT update End Sucess!!!"
》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》分隔线
remove-nat(名称)
——————————————————————
#script remove-nat
:log info "remove when ip is down"
/ip firewall nat remove WEB
/ip firewall nat remove POP
/ip firewall nat remove SMTP
:log info "remove sucessful!!!"
》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》

然后添加NET NETWATCH HOST
tool-netwatch
HOST 添上你当地的DNS服务器地址。(注:现在很多地方的DNS服务器地址都封了PING 显然添加这个已经不可了,
那这么办呢? NETWATCH需要得到的是PING的结果,我们可以用其他的IP代替就OK了.做这些的目一般都是做服务器,服务器需要用到的是域名,需要用DDN帮你解析你的域名,那我们在这里填上你DDN服务商的IP)
INTERVAL 填上 时间 一般30秒就OK
TIMEOUT 默认
UP 里填上add-nat

DOWN 里填 remove-nat
发表于 2008-2-20 22:22:41 | 显示全部楼层
有没有实际的例子
发表于 2008-2-23 06:40:11 | 显示全部楼层
这网上抄的吧?
您需要登录后才可以回帖 登录 | 会员注册

本版积分规则

不良信息举报Q:2000617

软路由

不良信息举报Q:2000617|Archiver|ROS软路由论坛 ROSABC.com 网络方案网络工程交流

GMT+8, 2024-4-16 20:13 , Processed in 0.934292 second(s), 22 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表