網絡拓撲以下:
服務器
需求描述:網絡
1.公司使用華爲USG防火牆鏈接互聯網,Trust區域192.168.1.0/24網段用戶可正常上網,該區域其餘網段禁止上網。USG出口IP:1.1.1.1/24 可用地址範圍:1.1.1.1--1.1.1.10,須要使用NAPT功能進行地址複用,地址池:1.1.1.5--1.1.1.10。
tcp
2.FTP和Web服務器供外部網絡用戶訪問,FTP服務器在VLAN 10,Web服務器在VLAN 20。其中FTP Server的IP地址爲10.1.1.10,端口號爲缺省值21,Web Server的IP地址爲10.1.2.10,端口爲80。二者對外公佈的地址分別爲1.1.1.2和1.1.1.3,對外使用的端口號均爲缺省值,即21和80。ide
配置步驟:測試
1.交換機配置
spa
[SW]vlan batch 10 203d
[SW]interface Ethernet0/0/1orm
[SW]port link-type accessserver
[SW]port default vlan 10blog
[SW]interface Ethernet0/0/2
[SW]port link-type access
[SW]port default vlan 20
[SW]interface GigabitEthernet0/0/1
[SW]port link-type trunk
[SW]port trunk allow-pass vlan 10 20
2.USG設備配置個接口的IP地址,並將其加入相應區域。
【USG】interface GigabitEthernet0/0/0.1
【USG】vlan-type dot1q 10
【USG】ip address 10.1.1.1 255.255.255.0
【USG】interface GigabitEthernet0/0/0.2
【USG】vlan-type dot1q 20
【USG】ip address 10.1.2.1 255.255.255.0
【USG】interface GigabitEthernet0/0/1
【USG】ip address 192.168.1.1 255.255.255.0
【USG】interface GigabitEthernet0/0/2
【USG】ip address 1.1.1.1 255.255.255.0
【USG】firewall zone trust
【USG】add interface GigabitEthernet0/0/1
【USG】firewall zone untrust
【USG】add interface GigabitEthernet0/0/2
【USG】firewall zone dmz
【USG】add interface GigabitEthernet0/0/0
【USG】add interface GigabitEthernet0/0/0.1
【USG】add interface GigabitEthernet0/0/0.2
3.配置地址池NAPT地址轉換。
【USG】nat address-group 10 1.1.1.5 1.1.1.10
【USG】nat-policy interzone trust untrust outbound
【USG】policy 1
【USG】action source-nat
【USG】policy source 192.168.1.0 0.0.0.255
【USG】address-group 10
4.配置區域間訪問控制策略。
【USG】policy interzone trust untrust outbound
【USG】policy 0
【USG】policy source 192.168.1.0 0.0.0.255
【USG】action permit
【USG】policy interzone dmz untrust inbound
【USG】policy 0
【USG】policy destination 10.1.1.10 0
【USG】policy service service-set ftp
【USG】action permit
【USG】policy 1
【USG】policy destination 10.1.2.10 0
【USG】policy service service-set http
【USG】action permit
5.配置NAT Server對外發布服務器
nat server 0 protocol tcp global 1.1.1.2 ftp inside 10.1.1.10 ftp
nat server 1 protocol tcp global 1.1.1.3 www inside 10.1.2.10 www
firewall interzone dmz untrust
detect ftp
6.測試
a.在內部PC上ping 1.1.1.100,而後在USG上查看NAT轉換,顯示NAT轉換正常。