|
发表于 2005-6-12 01:20:39
|
显示全部楼层
来自 中国–江苏–无锡
假设为Cisco Router,我搬了个例子来
端口重定向(端口映射)
如果ISP提供的IP地址比较多可以使用NAT为每一个服务器映射一个外部地址。但如果不是的时候(如就一个时,221.234.226.153),内网有四台服务器需要团对外提供服务.
Interface fastethernet0/0
Ip address 192.168.1.1 255.255.255.0
Duplex auto
Speed auto
Ip nat inside
No shutdown
Interface fastethernet0/1
Ip address 221.234.226.153 255.255.255.252
Duplex auto
Speed auto
Ip nat outside
No shutdown
ip route 0.0.0.0 0.0.0.0 221.234.226.154
Access-list 1 permit 192.168.1.0 0.0.0.255
Ip nat inside source list1 interface fastethernet0/1 overload
Ip nat inside source static tcp 192.168.1.2 80 221.234.226.153 80
Ip nat inside source static tcp 192.168.1.3 21 221.234.226.153 2121
Ip nat inside source static tcp 192.168.1.4 25 221.234.226.153 25
Ip nat inside source static tcp 192.168.1.5 27015 221.234.226.153 27016 |
|