一、配置接口
1、配置安全区域和接⼝IP地址
2、开启接⼝的Ping服务【可选】
也可通过命令来配置IP地址、所属区域、服务类型
[USG6000V1]interface g1/0/0
[USG6000V1-GigabitEthernet1/0/0]ip address 192.168.1.254 24
[USG6000V1-GigabitEthernet1/0/0]service-manage ping permit
[USG6000V1]interface g1/0/1
[USG6000V1-GigabitEthernet1/0/1]ip address 200.1.1.254 24
[USG6000V1]firewall zone trust
[USG6000V1-zone-trust]add interface g1/0/0
[USG6000V1]firewall zone untrust
[USG6000V1-zone-untrust]add interface g1/0/1
二、配置安全策略,允许安全区域的互相访问
1、配置trust可以访问untrst
可以成功ping通
web服务也可以访问
但是服务器ping 客⼾端,不通
因为我们配置的是 trust 可以访问 untrust,⽽untrust不可以访问trust
也可⽤命令配置
[USG6000V1]security-policy
[USG6000V1-policy-security]rule name OUT
[USG6000V1-policy-security-rule-OUT]source-zone trust
[USG6000V1-policy-security-rule-OUT]destination-zone untrust
[USG6000V1-policy-security-rule-OUT]action permit
三、配置NAT策略
1、配置EasyIP
2、抓包查看,地址发⽣了转换,转换为出接⼝地址
3、也可以配置NAPT,这⾥需要配置地址池
4、将EasyIP的启⽤的对勾去掉,或者之间删除
5、抓包查看,地址转换成了地址池中的地址
[USG6000V1]nat-policy
[USG6000V1-policy-nat]rule name EasyIP
[USG6000V1-policy-nat-rule-EasyIP]source-zone trust
[USG6000V1-policy-nat-rule-EasyIP]destination-zone untrust
[USG6000V1-policy-nat-rule-EasyIP]action nat easy-ip
//1.3版本的eNSP命令:action source-nat easy-ip
[USG6000V1]nat-policy
[USG6000V1-policy-nat]undo rule name EasyIP
[USG6000V1]nat address-group pool
[USG6000V1-address-group-pool]mode pat
[USG6000V1-address-group-pool]section 200.1.1.10
[USG6000V1]nat-policy
[USG6000V1-policy-nat]rule name PNAT
[USG6000V1-policy-nat-rule-PNAT]source-zone trust
[USG6000V1-policy-nat-rule-PNAT]destination-zone untrust
[USG6000V1-policy-nat-rule-PNAT]action nat address-group pool