防火墙配置
实验环境
实验思路
- 设置PC和Server的IP与网关
- 配置防火墙端口
- 在防火墙设置trust和untrust区
- 测试连通性,查看防火墙是否起作用
实验过程
1、pc和server IP设置
PC:
server:
2、端口设置
[USG6000V1]int g1/0/0
[USG6000V1-GigabitEthernet1/0/0]ip add 192.168.1.254 24
[USG6000V1-GigabitEthernet1/0/0]int g1/0/1
[USG6000V1-GigabitEthernet1/0/1]ip add 200.1.1.254 24
[USG6000V1-GigabitEthernet1/0/1]
3、配置防火墙
[USG6000V1]firewall zone trust
[USG6000V1-zone-trust]add int g1/0/0
[USG6000V1]firewall zone untrust
[USG6000V1-zone-untrust]add int g1/0/2
[USG6000V1]int g1/0/0
[USG6000V1-GigabitEthernet1/0/0]service-manage ping permit
trust区绑定g1/0/0口和untrust区绑定g1/0/1口,并允许ping g1/0/0口,此时可以ping通防火墙两端端口,却无法与服务器联通,需要允许trust区的流量通过防火墙进入untrust区,进行一下操作
[USG6000V1]security-policy
[USG6000V1-policy-security]rule name t_u
[USG6000V1-policy-security-rule-t_u]source-address 192.168.1.1 24
[USG6000V1-policy-security-rule-t_u]destination-address 200.1.1.1 24
[USG6000V1-policy-security-rule-t_u]action permit
4、连通性
可以看到从pc到server的流量可以通过,从server ping pc无法ping通。
总结
防火墙是通过有机结合各类用于安全管理与筛选的软件和硬件设备,帮助计算机网络于其内、外网之间构建一道相对隔绝的保护屏障,以保护用户资料与信息安全性的一种技术,通过合理配置合理部署防火墙安全策略以及安全区域,可以实现内网用户可以访问外网用户,反之不能访问内网用户和外网用户均可以访问服务器