参考:
1.https://linsir.org/post/how_to_install_IPSec_IKEV2_base_on_strongswan_with_CentOS7
2.https://raymii.org/s/tutorials/IPSEC_vpn_with_CentOS_7.html
strongswan.sh
1 |
|
/etc/strongswan/ipsec.conf
1 | #/etc/strongswan/ipsec.conf |
/etc/strongswan/strongswan.conf
1 | #/etc/strongswan/strongswan.conf |
/etc/strongswan/ipsec.secrets
1 | #/etc/strongswan/ipsec.secrets |
/etc/sysctl.conf
1 | net.ipv4.ip_forward = 1 |
配置防火墙
1 | firewall-cmd --permanent --add-rich-rule='rule protocol value="esp" accept' |
启动
1 | sysctl -p |