1. 程式人生 > 實用技巧 >配置通過NAT訪問Internet外網,並對外提供www服務的示例(NAT)

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

組網需求

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

1、拓撲圖

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、測試結果


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