DevOps Buzz
Search…
Bash / Shell
Bitbucket
Distros
Elasticsearch
General
Guidelines / Standards
microk8s
Prometheus
RabbitMQ
VirtualBox
Cheat sheet

Get connections status logs

1
ipsec statusall
Copied!

Restart connection

1
mkdir -p /var/run/xl2tpd
2
touch /var/run/xl2tpd/l2tp-control
3
service strongswan restart
4
sleep 2
5
service xl2tpd restart
6
sleep 2
7
ipsec up YOUR-CONNECTION
Copied!

Config

Documentation

ipsec.conf: conn Reference - ipsec.conf: conn Reference - strongSwan

Example

/etc/ipsec.conf
1
version 2.0
2
3
config setup
4
charonstart=yes
5
interfaces="%none"
6
nat_traversal=yes
7
plutodebug="all"
8
9
conn clear
10
auto=ignore
11
12
conn clear-or-private
13
auto=ignore
14
15
conn private-or-clear
16
auto=ignore
17
18
conn private
19
auto=ignore
20
21
conn block
22
auto=ignore
23
24
conn packetdefault
25
auto=ignore
26
27
conn %default
28
keyexchange=ikev1
29
30
31
conn my-conn
32
left=10.128.5.1
33
leftid="78.69.145.86"
34
right=220.40.60.210
35
leftsubnet=10.1.1.0/24
36
rightsubnet=10.136.6.240/28
37
leftsourceip=10.123.1.117
38
ike=3des-sha1-modp1024,3des-sha256-modp1024,3des-sha384-modp1024!
39
keyexchange=ikev1
40
ikelifetime=86400s
41
esp=3des-sha384,3des-sha256,3des-sha1!
42
keylife=3600s
43
rekeymargin=540s
44
type=tunnel
45
pfs=no
46
compress=no
47
authby=secret
48
auto=start
49
keyingtries=%forever
50
#conn my-conn
Copied!