jxwjq 发表于 2018-7-26 13:27:32

华为USG地址池方式的NAPT和NAT Server配置案例

  网络拓扑如下:

  需求描述:
  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。
  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。
  配置步骤:
  1.交换机配置
  vlan batch 10 20
  interface Ethernet0/0/1
  port link-type access
  port default vlan 10
  interface Ethernet0/0/2
  port link-type access
  port default vlan 20
  interface GigabitEthernet0/0/1
  port link-type trunk
  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转换正常。

b.在外部用户上测试访问FTP和Web服务器,USG上结果显示正常。
页: [1]
查看完整版本: 华为USG地址池方式的NAPT和NAT Server配置案例