配置通過NAT訪問Internet外網,並對外提供www服務的示例(NAT)


組網需求

內網用戶通過路由器的NAT地址轉換功能來訪問Internet,並且向外網用戶提供www服務。

1、拓撲圖

image

2、配置說明

用於轉換的外網地址,不能用於其他的NAT中。

3、配置文件

#
acl number 2000
 rule 5 permit source 192.168.1.0 0.0.0.255 #
#
 nat address-group 1 218.246.109.101 218.246.109.200
#
interface GigabitEthernet0/0/0
 ip address 218.246.109.100 255.255.255.0
 nat static protocol tcp global 218.246.109.222 www inside 192.168.1.100 www netmask 255.255.255.255
 nat outbound 2000 address-group 1
#
interface GigabitEthernet0/0/1
#
interface GigabitEthernet0/0/2
 ip address 192.168.1.254 255.255.255.0
#
ip route-static 0.0.0.0 0.0.0.0 218.246.109.233

查看配置

[AR2]dis nat static
  Static Nat Information:
  Interface  : GigabitEthernet0/0/0
    Global IP/Port     : 218.246.109.222/80(www)
    Inside IP/Port     : 192.168.1.100/80(www)
    Protocol : 6(tcp)
    VPN instance-name  : ----
    Acl number         : ----
    Netmask  : 255.255.255.255
    Description : ----

  Total :    1
[AR2]

4、測試結果

image


讀書和健身總有一個在路上


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM