1.配置IP地址
int gi 1/0/0
ip add 192.168.1.1 24
int gi 1/0/1
ip add 9.9.9.1 24
2.划分安全区域
#将用户区域划分高优先级区域
#服务器区域划分为中等优先级区域
firewall zone trust
add interface GigabitEthernet1/0/0 #将接口加入高优先级区域
firewall zone untrust
add interface GigabitEthernet1/0/1 #将接口加入中等优先级区域
3.配置安全策略
security-policy
rule name security #创建策略 名为security
source-zone trust #匹配该策略的源区域
destination-zone untrust #目标区域
service http #配置匹配该策略的端口为80
action permit #动作为允许
#这里没配置源目IP段默认就是所有,即只要在trust 且目标是untrust 的任意ip且端口是80即可。
测试页面。
且能在防火墙看到会话表。