客户侧防火墙对接IPSec VPN实例 客户侧防火墙配置例子 客户侧私网网段:192.168.10.0/24 云侧私网网段:10.132.0.0/24,10.132.1.0/24,10.132.20.0/24,10.132.21.0/24 客户侧VPN设备为strongswan5.8.0 云侧是被动协商,不需要配置IKE与ESP算法,只需在客户侧防火墙配置云侧支持的算法(参考前两小节表格)即可。 云侧IPsec VPN实例信息如下: IPsec VPN名称:IPSecVPN 客户侧私网网段:192.168.10.0/24 客户侧公网地址:58.63.x.2 IKE版本:IKEv2 预共享密钥(自定义): 标识符类型:FQDN 云端标识符:cloud.responder 客户侧标识符:customer.initiator 客户侧strongswan配置如下: (1)修改/etc/strongswan/ipsec.conf,参考配置如下: conn %default ikelifetime12h keylife4h rekeymargin3m keyingtries1 authbypsk keyexchangeikev2 mobikeno conn customertocloud left58.63.x.2 leftsubnet192.168.10.0/24 leftauthpsk leftid@customer.initiator right113.125.x.102 rightsubnet10.132.0.0/24,10.132.1.0/24,10.132.20.0/24,10.132.21.0/24 rightauthpsk rightid@cloud.responder ikeaes128gcm16prfsha256modp2048! espaes128gcm16esn! autostart dpddelay10s dpdtimeout90s dpdactionrestart (2)修改/etc/strongswan/ipsec.secrets配置预共享密钥为“”。 (3)修改/etc/strongswwan/strongswan.d/charon.conf,设置makebeforebreakno,默认是no。