testing: Converted swanctl to systemd

This commit is contained in:
Andreas Steffen
2017-11-11 16:41:15 +01:00
parent 65f74cd13d
commit 70dc5bb8ad
181 changed files with 1170 additions and 849 deletions
@@ -1,11 +1,15 @@
# /etc/strongswan.conf - strongSwan configuration file
charon {
charon-systemd {
load = random nonce aes sha1 sha2 pem pkcs1 curve25519 gmp x509 curl revocation hmac vici kernel-netlink socket-default updown
start-scripts {
creds = /usr/local/sbin/swanctl --load-creds
conns = /usr/local/sbin/swanctl --load-conns
}
syslog {
daemon {
default = 1
}
auth {
default = 0
}
}
keep_alive = 5
}
@@ -1,11 +1,14 @@
# /etc/strongswan.conf - strongSwan configuration file
charon {
charon-systemd {
load = random nonce aes sha1 sha2 pem pkcs1 curve25519 gmp x509 curl revocation hmac vici kernel-netlink socket-default updown
start-scripts {
creds = /usr/local/sbin/swanctl --load-creds
pools = /usr/local/sbin/swanctl --load-pools
conns = /usr/local/sbin/swanctl --load-conns
}
syslog {
daemon {
default = 1
}
auth {
default = 0
}
}
}
@@ -1,11 +1,15 @@
# /etc/strongswan.conf - strongSwan configuration file
charon {
charon-systemd {
load = random nonce aes sha1 sha2 pem pkcs1 curve25519 gmp x509 curl revocation hmac vici kernel-netlink socket-default updown
start-scripts {
creds = /usr/local/sbin/swanctl --load-creds
conns = /usr/local/sbin/swanctl --load-conns
}
syslog {
daemon {
default = 1
}
auth {
default = 0
}
}
keep_alive = 5
}
@@ -1,5 +1,5 @@
alice::service charon stop 2> /dev/null
venus::service charon stop 2> /dev/null
sun::service charon stop 2> /dev/null
alice::systemctl stop strongswan-swanctl
venus::systemctl stop strongswan-swanctl
sun::systemctl stop strongswan-swanctl
sun::iptables-restore < /etc/iptables.flush
moon::iptables -t nat -F
@@ -1,9 +1,9 @@
sun::iptables-restore < /etc/iptables.rules
moon::iptables -t nat -A POSTROUTING -o eth0 -s 10.1.0.0/16 -p udp -j SNAT --to-source PH_IP_MOON:1024-1100
moon::iptables -t nat -A POSTROUTING -o eth0 -s 10.1.0.0/16 -p tcp -j SNAT --to-source PH_IP_MOON:2000-2100
sun::service charon start 2> /dev/null
alice::service charon start 2> /dev/null
venus::service charon start 2> /dev/null
sun::systemctl start strongswan-swanctl
alice::systemctl start strongswan-swanctl
venus::systemctl start strongswan-swanctl
sun::expect-connection nat-t
alice::expect-connection nat-t
venus::expect-connection nat-t