StrongSwan安装配置
2019-04-28 本文已影响0人
袁先生的笔记
环境
系统:CentOS 6.10
安装
-
安装EPEL扩展源
# yum install epel-release
-
安装StrongSwan
# yum install strongswan
配置
- 配置ipsec.conf
# vim /etc/strongswan/ipsec.conf
config setup
uniqueids = never
conn psk_xauth
keyexchange=ikev1
left=%defaultroute
leftauth=psk
leftsubnet=0.0.0.0/0
right=%any
rightauth=psk
rightauth2=xauth
rightsourceip=10.0.0.0/24
auto=start
- 配置ipsec.secrets
# vim /etc/strongswan/ipsec.secrets
: PSK "YourPreShareKey"
TestUser %any : XAUTH "YourPassword"
启动
# chkconfig strongswan on
# /etc/init.d/strongswan start
客户端连接
账号:TestUser
密码:YourPassword
预共享密钥:YourPreShareKey