找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 4007|回复: 7

怎样编写CL的一端口映射?

[复制链接]
发表于 2004-9-12 00:11:02 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

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

×
我想映射局域网内的192.168.0.85 UDP协议 端口27015 .请问应该怎么编写?编写后应该应该怎样编保存?要不要重启?
routeros
发表于 2004-9-12 02:33:10 | 显示全部楼层
如果外部ip是自动分配的,而且不改变端口,你可以写成:auto Y UDP 27015 192.168.0.85CL当中大多时候不必要去改文件的。# Auto-Port-Forward Forwarding Configuration File## This file contains entries in the following format:## type active ## type = auto or port or forward## active = Y or N## for "auto" rule =# protocol port desination [dns]# or# protocol# destination [dns]## protocol = TCP, UDP with port or a protocol number without port# port = port or port range in the format of "start:end"# destination = destination IP address# dns = flag to create pre-post-route for lan to wan ip (optional)## for "port" rule:# destination [internet_ip] [protocol [port1 [port2]]] [dns]## destination = destination IP address# internet_ip = internet IP address (optional)# protocol = protocol name or number (optional)# port1 = the port to forward (optional)# port2 = the port to forward to (optional)# dns = flag to create pre-post-route for lan to wan ip (optional)## A "#" at the 1st character in a line can be used to denote a comment
routeros
回复

使用道具 举报

 楼主| 发表于 2004-9-13 01:34:10 | 显示全部楼层
QUOTE (哈啤猫 @ Sep 12 2004, 02:33 AM)
如果外部ip是自动分配的,而且不改变端口,你可以写成:auto Y UDP 27015 192.168.0.85CL当中大多时候不必要去改文件的。# Auto-Port-Forward Forwarding Configuration File## This file contains entries in the following format:## type active ## type = auto or port or forward## active = Y or N## for "auto" rule =# protocol port desination [dns]# or# protocol# destination [dns]## protocol = TCP, UDP with port or a protocol number without port# port = port or port range in the format of "start:end"# destination = destination IP address# dns = flag to create pre-post-route for lan to wan ip (optional)## for "port" rule:# destination [internet_ip] [protocol [port1 [port2]]] [dns]## destination = destination IP address# internet_ip = internet IP address (optional)# protocol = protocol name or number (optional)# port1 = the port to forward (optional)# port2 = the port to forward to (optional)# dns = flag to create pre-post-route for lan to wan ip (optional)## A "#" at the 1st character in a line can be used to denote a comment  
  我的外网IP是固定IP的呀..应该怎么写?
routeros
回复

使用道具 举报

发表于 2004-9-13 03:31:31 | 显示全部楼层
Create a new forward: [ Single Port   | Active : Yes  Protocol : UDPInternal IP Address : 192.168.0.85 Internal Port Number (Optional) : 27015External IP Address (Optional) : ???????External Port Number (Optional): 27105Enable LAN to use External IP ? (Recommended): YesComments (Optional) : ???????:27015 192.168.0.85:27015如果用port指令 写成:===============================================port Y 192.168.0.85 ??????? udp 27015 27015 dns===============================================??????? 是你的外网ip
routeros
回复

使用道具 举报

发表于 2004-9-13 03:35:12 | 显示全部楼层
你为什么非要写代码?这里可以设置:http://192.168.0.1:8180/cgi-bin/portfw.cgiCreate a new forward: [ Single Port ]然后: Control Actions: [ Reload Firewall ]If you need, you can  backup your Configuration.
routeros
回复

使用道具 举报

 楼主| 发表于 2004-9-13 05:59:46 | 显示全部楼层
因为我是通过远程SSH登录的呀..没办法....RELOAD FIREWALL会不会自动重启或者要不要重新启动?
routeros
回复

使用道具 举报

 楼主| 发表于 2004-9-13 20:39:10 | 显示全部楼层
External IP  下的Any是代表所有IP都可以访问?如果是External IP是一个IP,那是不是只允许指定的IP访问?谢谢哈啤猫
routeros
回复

使用道具 举报

发表于 2004-9-13 21:54:57 | 显示全部楼层
你完全可以用SSH进行远端WEB界面的控制。同样是使用PUTTY之类的SSH登录。详细的你可以看着里:http://www.rictec.com.br/claudio/coyote/ssh.htm“Example 2 - Using the SSH Tunnel to access the Coyote Web Administrator  Imagine you want to access the Coyote Web Administrator from internet and your internal Coyote IP number is 192.168.0.1- Run putty - Go to Connection --> SSH --> Tunnels- At Source Port put 8180, at Destination put 192.168.0.1:8180, click Add.- Make your login at coyote (Follow the instructions above).- While putty is running the tunnel will stay open as port 8180 in your local computer.- Minimize putty.- Open your favorite browser. Type: http://localhost:8180 or http://127.0.0.1:8180.- After finish using the tunnel, logout Coyote and close putty.”很不错的方法。你刚才提到的“External IP 下的Any是代表所有IP都可以访问?如果是External IP是一个IP,那是不是只允许指定的IP访问?”感觉你理解上有问题。ANY 是指外网的所有IP,看你拥有多少IP了。并不是什么“只允许指定的IP访问”这里的 EXTERNAL IP 是你的外网IP。所谓的端口映射实际上就是端口转发。把对你外网IP的某个端口的访问转为内网某个IP的端口的访问。我在上个帖子中所写的问号,是需要你改成你外网的IP。如果你使用动态分配的IP,你可以使用另外的格式,不需要写入外网IP。
routeros
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|软路由 ( 渝ICP备15001194号-1|渝公网安备 50011602500124号 )

GMT+8, 2024-9-20 05:27 , Processed in 0.052440 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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