kenji1029 发表于 2004-3-11 18:32:38

用telnet建立nat的映射端口出错命令的问题

Command Base: $create nat rule entry?...............................
Parameter                         Description
---------                         -----------
ruleid <decvalue>                  Rule identifier                  
<rule type>                        Type:basic|filter|napt|bimap|rdr|pass
[ prot <ProtType> ]                Vals:any|tcp|udp|icmp|
[ ifname <name> ]                  Interface name                     
[ lcladdrfrom <ip addr> ]          Start source address               
[ lcladdrto <ip addr> ]            End source address               
[ glbaddrfrom <ip addr> ]          Start global address               
[ glbaddrto <ip addr> ]            End global address               
[ destaddrfrom <ip addr> ]         Start dest address               
[ destaddrto <ip addr> ]         End dest address                  
[ destportfrom <Portval> ]         Portval: as given below            
[ destportto <Portval> ]         Portval: as given below            
[ lclport <Portval> ]            Portval: as given below            
_____________________________________________________________________________
Portval   : {num <decvalue>}|echo|discard|chargen|ftp|telnet|smtp|dns|bootp
          :               |tftp|http|pop3|snmp
$create nat rule entry ruleid 21 rdr prot tcp ifname ppp-0 lcladdrfrom 192.168.1.2 lcladdrto 192.168.1.2 glbaddrfrom 0.0.0.0 glbaddrto 0.0.0.0 destaddrfrom 0.0.0.0 destaddrto 255.255.255.255 destportfrom 21 destportto 21 lclport 21
错误:不适当的命令
哪个命令错误?

goingchan 发表于 2004-3-11 21:31:00

用telnet建立nat的映射端口出错命令的问题

destportfrom 21 destportto 21 lclport 21这里错了
“21”可用“ftp”直接替代
或者把“21”换为“num 21”

kenji1029 发表于 2004-3-11 22:56:52

用telnet建立nat的映射端口出错命令的问题

试验后正确的命令是
$create nat rule entry ruleid 22 rdr prot tcp ifname ppp-0 lcladdrfrom 192.168.1.2 lcladdrto 192.168.1.2 glbaddrfrom 0.0.0.0 glbaddrto 0.0.0.0 destportfrom num 22 destportto num 22 lclport num 22
谢谢goingchan
/me hughug goingchan ^o^

yxj1201 发表于 2011-10-7 00:57:47

Message

The selected web page is not implemented yet.
页: [1]
查看完整版本: 用telnet建立nat的映射端口出错命令的问题