虚拟防火墙简单配置实验
实验topo:
实验目的:
- 熟悉双机热备原理
- 双机热备组网规划
实验需求:
- PC1访问外网
配置思路:
- 防火墙配置接口加区域,注意:给虚拟防火墙的接口会被初始化,所以不用配
interface GigabitEthernet1/0/0
ip address 200.1.1.1 255.255.255.240
firewall zone trust ---左边接口放trust区域
add interface Virtual-if0
firewall zone untrust ---右边接口放untrust区域
add interface GigabitEthernet1/0/0
- ISP配置接口:
interface Ethernet0/0/0
ip address 200.1.1.2 255.255.255.240
interface LoopBack1
ip address 100.100.100.100 255.255.255.255
- 开启VSYS功能:
VSYS enable
vsys name SC
- 进入虚拟防火墙SC,并给接口加区域
switch vsys SC 进入虚拟防火墙内部
firewall zone untrust ---右边加untrust
add interface Virtual-if1
firewall zone trust ---左边加trust
add interface G1/0/1
- 写默认路由指向主墙:
IP router-static 0.0.0.0 0 public
- 在虚拟墙上和主墙上写安全策略:
SC:
security-policy
rule name a1
source-zone trust
destination-zone untrust
action permit
FW1:
security-policy
rule name a1
source-zone trust
destination-zone untrust
action permit
- 在主墙上写nat policy访问外网:
nat-policy
rule name t
source-zone trust
destination-zone untrust
action nat easy-ip
实验结果:
访问外网:
PC>ping 100.100.100.100
Ping 100.100.100.100: 32 data bytes, Press Ctrl_C to break
From 100.100.100.100: bytes=32 seq=1 ttl=253 time=31 ms
From 100.100.100.100: bytes=32 seq=2 ttl=253 time<1 ms
From 100.100.100.100: bytes=32 seq=3 ttl=253 time=16 ms
From 100.100.100.100: bytes=32 seq=4 ttl=253 time=15 ms
From 100.100.100.100: bytes=32 seq=5 ttl=253 time=16 ms