概要
解决网络传输的安全隐患,总部分公司出差人员等访问总部网络资源的问题 。
整体架构流程
VPN=隧道+安全
技术细节
分部PC1通过PPPoe拨号上网的方式与总部PC2进行通讯。
FW1
int g1/0/0
ip ad 10.1.1.1 24
q
拨号口
int Dialer 1
dialer user wakin
dialer bundle 1
ppp chap user wakin
ppp chap password cipher huawei
ip address ppp-negotiate
q
int g1/0/1
pppoe-client dial-bundle-number 1
q
ip route-static 0.0.0.0 0.0.0.0 Dialer1
zone
firewall zone trust
add int g1/0/0
q
firewall zone dmz
add int g1/0/0
add int dialer 1
q
security-policy
rule name ICMP
source-zone trust
destination-zone dmz
action permit
q
rule name ESP
source-zone dmz
destination-zone local
action permit
总部防火墙采用默认策略放开,忽略了策略安全区域配置请读者自行补充
IPSec
设置数据流,捕获到去往总部的地址送往IPSec VPN隧道
acl 3000
rule 10 permit ip destination 10.1.2.0 0.0.0.255
q
定义IPSec的加密算法、认证算法
ipsec proposal 1
esp encryption-algorithm aes-256
esp authentication-algorithm sha2-256
q
定义IKE使用的加密算法、认证算法和DH算法以及周期
ike proposal 1
authentication-algorithm md5
encryption-algorithm aes-256
dh group2
sa duration 3600
q
定义对端IKE发起协商的地址,设置身份认证信息密码,定义该隧道使用的安全提议
ike peer ZB
remote-address 6.6.6.6
pre-shared-key cipher wakin
ike-proposal 1
q
定义那些流量需要保护,制定了IKE SA使用的参数和IPSec SA使用的参数
ipsec policy TOZBVPN 1 isakmp
security acl 3000
ike-peer ZB
proposal 1
q
注意在拨号口捕获去往总部的流量,拨号网络所有的流量都从拨号口发出
int dialer 1
ipsec policy TOZBVPN
NAT
创建防火墙NAT采用EasyIP,源区域为PC所在区域,目标区域为拨号口dialer1接口所在区域
nat-policy
rule name EasyIP
source-zone trust
destination-zone untrust
action source-nat easy-ip
FW2
int g1/0/0
ip ad 6.6.6.6 24
int g1/0/1
ip ad 10.1.2.1 24
q
firewall zone untrust
add int g1/0/0
q
firewall zone trust
add int g1/0/1
q
ip route-static 0.0.0.0 0 6.6.6.1
acl number 3001
rule 5 permit ip destination 172.16.0.0 0.0.0.255
ipsec proposal 2
esp encryption-algorithm aes-256
esp authentication-algorithm sha2-256
q
ike proposal 2
authentication-algorithm md5
encryption-algorithm aes-256
dh group2
sa duration 3600
q
ike peer FB
pre-shared-key cipher wakin
ike-proposal 2
security acl 3001
q
因为对端设备IP地址不固定所以需要配置IPSec 模板,只能由分布来触发该隧道。
IPSec模板方式只能响应对端发起的协商求,不能主动发起协商。但是在分出接口配置安全策略时加上auto-neg后,不需要流量触发直接建立IPSec隧道。
ipsec policy-template FBMB 10
ike-peer FB
proposal 2
q
ipsec policy TOFBVPN 10 isakmp template FBMB
int g1/0/0
ipsec policy TOFBVPN
PPPoE_Server
sys
sys ar1
aaa
local-user wakin password cipher huawei
local-user wakin service-type ppp
q
ip pool 1
net 172.16.0.0 mask 24
gateway-list 172.16.0.1
q
int virtual-template 1
ppp authentication-mode chap
ip ad 172.16.0.1 24
remote address pool 1
q
int g0/0/0
pppoe-server bind virtual-template 1
q
int g0/0/1
ip ad 6.6.6.1 24
查看实验结果
抓包分析
PPPoe阶段
IKE SA两个阶段,本次实验采用IKE V2