日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 综合教程 >内容正文

综合教程

锐捷路由器端口映射设置-如何设置路由器映射端口

發(fā)布時間:2023/12/1 综合教程 31 生活家
生活随笔 收集整理的這篇文章主要介紹了 锐捷路由器端口映射设置-如何设置路由器映射端口 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

網(wǎng)吧里有服務器采用私網(wǎng)的IP地址,提供WWW、FTP、E-mail等服務,現(xiàn)在想讓公網(wǎng)上的電腦也能夠訪問這臺服務器,配置如下:

由于路由器的WAN口采用的是公網(wǎng)的IP地址,如果需要局域網(wǎng)的服務器要提供給公網(wǎng)的電腦訪問的話,那么采用端口映射的方式,可以實現(xiàn)。由于每種服務的端口都是不一樣的(WWW服務:80端口;FTP服務:21端口),因此將服務器的各種端口與映射到公網(wǎng)的地址相應的端口上,這樣公網(wǎng)上的電腦訪問路由器的WAN口的地址,即可訪問到局域網(wǎng)的服務器,下面一個例子進行說明:

為了實現(xiàn)這些功能,需要配置NAT靜態(tài)映射功能。快速配置功能中不包含該功能的設置,因此需要在第一次啟動路由器后使用“no”放棄快速配置然后進入特權(quán)用戶模式進行高級設置:

!進入特權(quán)用戶層

Red-Giant>enable

!進入全局配置層

Red-Giant#config terminal Enter configuration commands, one per line. End with CNTL/Z.

!進入WAN口配置層

Red-Giant(config)#interface fastethernet 0

!配置WAN口地址

Red-Giant(config-if)#ip address 218.5.19.2 255.255.255.0

!設置WAN口為共享連接的Internet接入口

Red-Giant(config-if)#ip nat outside

!啟用WAN口

Red-Giant(config-if)#no shut

!返回普通用戶層

Red-Giant(config-if)#end

Red-Giant#

!這些是系統(tǒng)提示信息,系統(tǒng)提示W(wǎng)AN口鏈路處于UP狀態(tài)(可通訊狀態(tài)).

%UPDOWN: Line protocol on Interface FastEthernet0, changed state to up %UPDOWN: Interface FastEthernet0, changed state to up Red-Giant#config terminal Enter configuration commands, one per line. End with CNTL/Z.

!進入LAN口配置層

Red-Giant(config)#interface fastethernet 1

!配置LAN口地址

Red-Giant(config-if)#ip address 192.168.0.1 255.255.255.0

!設置LAN口為共享連接的Intranet接入口

Red-Giant(config-if)#ip nat inside

!啟用LAN口

Red-Giant(config-if)#no shut

Red-Giant(config-if)#end

Red-Giant#

%UPDOWN: Line protocol on Interface FastEthernet1, changed state to up

%UPDOWN: Interface FastEthernet1, changed state to up

Red-Giant#config terminal

Enter configuration commands, one per line. End with CNTL/Z.

!配置默認路由以訪問Internet

Red-Giant(config)#ip route 0.0.0.0 0.0.0.0 fastethernet 0 218.5.19.1

!配置NAT快轉(zhuǎn)優(yōu)化

Red-Giant(config)#ip nat optimize

!配置NAT應用的訪問列表

Red-Giant(config)#access-list 1 permit any

!配置連接共享規(guī)則

Red-Giant(config)#ip nat inside source list 1 interface fastethernet 0

!配置FTP服務器的靜態(tài)映射 Red-Giant(config)#ip nat inside source static tcp 192.168.0.2 20 218.5.19.2 20

Red-Giant(config)#ip nat inside source static tcp 192.168.0.2 21 218.5.19.2 21

!配置WEB服務器的靜態(tài)映射

Red-Giant(config)#ip nat inside source static tcp 192.168.0.3 80 218.5.19.2 80

!配置EMAIL服務器的靜態(tài)映射

Red-Giant(config)#ip nat inside source static tcp 192.168.0.4 25 218.5.19.2 25

Red-Giant(config)#ip nat inside source static tcp 192.168.0.4 110 218.5.19.2 110

Red-Giant(config)#end

Red-Giant#

Red-Giant#config terminal

Enter configuration commands, one per line. End with CNTL/Z.

!配置遠程用戶Telnet訪問口令

Red-Giant(config)#line vty 0 4

Red-Giant(config-line)#password remoteuser

Red-Giant(config-line)#end

Red-Giant#

Red-Giant#config terminal

Enter configuration commands, one per line. End with CNTL/Z.

Red-Giant(config)#enable secret private

!配置路由器名稱

Red-Giant(config)#host NBR

NBR(config)#end

NBR#

!保存配置

NBR#write

Building configuration...

[OK]

NBR#

通過以上配置,公網(wǎng)上的電腦即可通過訪問WAN口IP地址來達到訪問局域網(wǎng)服務器的目的

總結(jié)

以上是生活随笔為你收集整理的锐捷路由器端口映射设置-如何设置路由器映射端口的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。