testing: Converted ipv6/rw-rfc3779-ikev2 to swanctl
This commit is contained in:
@@ -1,18 +1,13 @@
|
|||||||
carol::ipsec status 2> /dev/null::home.*ESTABLISHED.*[email protected].*moon.strongswan.org::YES
|
|
||||||
dave:: ipsec status 2> /dev/null::home.*ESTABLISHED.*[email protected].*moon.strongswan.org::YES
|
|
||||||
moon:: ipsec status 2> /dev/null::rw\[1]: ESTABLISHED.*moon.strongswan.org.*[email protected]::YES
|
|
||||||
moon:: ipsec status 2> /dev/null::rw\[2]: ESTABLISHED.*moon.strongswan.org.*[email protected]::YES
|
|
||||||
carol::ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
|
|
||||||
dave:: ipsec status 2> /dev/null::home.*INSTALLED, TUNNEL::YES
|
|
||||||
moon:: ipsec status 2> /dev/null::rw[{]1}.*INSTALLED, TUNNEL::YES
|
|
||||||
moon:: ipsec status 2> /dev/null::rw[{]2}.*INSTALLED, TUNNEL::YES
|
|
||||||
moon:: cat /var/log/daemon.log::TS fec0:\:10/128 is contained in address block constraint fec0:\:10/128::YES
|
moon:: cat /var/log/daemon.log::TS fec0:\:10/128 is contained in address block constraint fec0:\:10/128::YES
|
||||||
moon:: cat /var/log/daemon.log::TS fec0:\:20/128 is contained in address block constraint fec0:\:20/128::YES
|
moon:: cat /var/log/daemon.log::TS fec0:\:20/128 is contained in address block constraint fec0:\:20/128::YES
|
||||||
carol::cat /var/log/daemon.log::TS fec1:\:/16 is contained in address block constraint fec1:\:/16::YES
|
carol::cat /var/log/daemon.log::TS fec1:\:/16 is contained in address block constraint fec1:\:/16::YES
|
||||||
dave:: cat /var/log/daemon.log::TS fec1:\:/16 is contained in address block constraint fec1:\:/16::YES
|
dave:: cat /var/log/daemon.log::TS fec1:\:/16 is contained in address block constraint fec1:\:/16::YES
|
||||||
carol::ping6 -c 1 ip6-alice.strongswan.org::64 bytes from ip6-alice.strongswan.org: icmp_seq=1::YES
|
carol::ping6 -c 1 ip6-alice.strongswan.org::64 bytes from ip6-alice.strongswan.org: icmp_seq=1::YES
|
||||||
dave:: ping6 -c 1 ip6-alice.strongswan.org::64 bytes from ip6-alice.strongswan.org: icmp_seq=1::YES
|
dave:: ping6 -c 1 ip6-alice.strongswan.org::64 bytes from ip6-alice.strongswan.org: icmp_seq=1::YES
|
||||||
moon::tcpdump::IP6 ip6-carol.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
carol::swanctl --list-sas --raw 2> /dev/null::home.*version=2 state=ESTABLISHED local-host=fec0:\:10 local-port=4500 local-id=carol@strongswan.org remote-host=fec0:\:1 remote-port=4500 remote-id=moon.strongswan.org initiator=yes.*encr-alg=AES_CBC encr-keysize=128 integ-alg=HMAC_SHA2_256_128 prf-alg=PRF_HMAC_SHA2_256 dh-group=CURVE_25519.*child-sas.*home.*state=INSTALLED mode=TUNNEL.*ESP.*encr-alg=AES_CBC encr-keysize=128 integ-alg=HMAC_SHA2_256_128.*local-ts=\[fec0:\:10/128] remote-ts=\[fec1:\:/16]::YES
|
||||||
|
dave:: swanctl --list-sas --raw 2> /dev/null::home.*version=2 state=ESTABLISHED local-host=fec0:\:20 local-port=4500 [email protected] remote-host=fec0:\:1 remote-port=4500 remote-id=moon.strongswan.org initiator=yes.*encr-alg=AES_CBC encr-keysize=128 integ-alg=HMAC_SHA2_256_128 prf-alg=PRF_HMAC_SHA2_256 dh-group=CURVE_25519.*child-sas.*home.*state=INSTALLED mode=TUNNEL.*ESP..*encr-alg=AES_CBC encr-keysize=128 integ-alg=HMAC_SHA2_256_128.*local-ts=\[fec0:\:20/128] remote-ts=\[fec1:\:/16]::YES
|
||||||
|
moon:: swanctl --list-sas --ike-id 1 --raw 2> /dev/null::rw.*version=2 state=ESTABLISHED local-host=fec0:\:1 local-port=4500 local-id=moon.strongswan.org remote-host=fec0:\:10 remote-port=4500 [email protected].*encr-alg=AES_CBC encr-keysize=128 integ-alg=HMAC_SHA2_256_128 prf-alg=PRF_HMAC_SHA2_256 dh-group=CURVE_25519.*child-sas.*net.*reqid=1 state=INSTALLED mode=TUNNEL.*ESP.*encr-alg=AES_CBC encr-keysize=128 integ-alg=HMAC_SHA2_256_128.*local-ts=\[fec1:\:/16] remote-ts=\[fec0:\:10/128]::YES
|
||||||
|
moon:: swanctl --list-sas --ike-id 2 --raw 2> /dev/null::rw.*version=2 state=ESTABLISHED local-host=fec0:\:1 local-port=4500 local-id=moon.strongswan.org remote-host=fec0:\:20 remote-port=4500 [email protected].*encr-alg=AES_CBC encr-keysize=128 integ-alg=HMAC_SHA2_256_128 prf-alg=PRF_HMAC_SHA2_256 dh-group=CURVE_25519.*child-sas.*net.*reqid=2 state=INSTALLED mode=TUNNEL.*ESP.*encr-alg=AES_CBC encr-keysize=128 integ-alg=HMAC_SHA2_256_128.*local-ts=\[fec1:\:/16] remote-ts=\[fec0:\:20/128]::YES
|
||||||
moon::tcpdump::IP6 ip6-moon.strongswan.org > ip6-carol.strongswan.org: ESP::YES
|
moon::tcpdump::IP6 ip6-moon.strongswan.org > ip6-carol.strongswan.org: ESP::YES
|
||||||
moon::tcpdump::IP6 ip6-dave.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
moon::tcpdump::IP6 ip6-dave.strongswan.org > ip6-moon.strongswan.org: ESP::YES
|
||||||
moon::tcpdump::IP6 ip6-moon.strongswan.org > ip6-dave.strongswan.org: ESP::YES
|
moon::tcpdump::IP6 ip6-moon.strongswan.org > ip6-dave.strongswan.org: ESP::YES
|
||||||
|
|||||||
@@ -1,26 +0,0 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
|
||||||
|
|
||||||
config setup
|
|
||||||
|
|
||||||
ca strongswan
|
|
||||||
cacert=strongswanCert.pem
|
|
||||||
certuribase=http://ip6-winnetou.strongswan.org/certs/rfc3779/
|
|
||||||
crluri=http://ip6-winnetou.strongswan.org/strongswan_rfc3779.crl
|
|
||||||
auto=add
|
|
||||||
|
|
||||||
conn %default
|
|
||||||
ikelifetime=60m
|
|
||||||
keylife=20m
|
|
||||||
rekeymargin=3m
|
|
||||||
keyingtries=1
|
|
||||||
|
|
||||||
conn home
|
|
||||||
left=PH_IP6_CAROL
|
|
||||||
leftcert=carolCert.pem
|
|
||||||
[email protected]
|
|
||||||
leftfirewall=yes
|
|
||||||
right=PH_IP6_MOON
|
|
||||||
[email protected]
|
|
||||||
rightsubnet=0::0/0
|
|
||||||
keyexchange=ikev2
|
|
||||||
auto=add
|
|
||||||
@@ -1,6 +1,18 @@
|
|||||||
# /etc/strongswan.conf - strongSwan configuration file
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
charon {
|
swanctl {
|
||||||
hash_and_url = yes
|
load = pem pkcs1 x509 revocation constraints pubkey openssl random
|
||||||
load = random nonce aes sha1 sha2 md5 pem pkcs1 curve25519 gmp x509 curl revocation addrblock hmac stroke kernel-netlink socket-default updown
|
}
|
||||||
|
|
||||||
|
charon-systemd {
|
||||||
|
load = random nonce aes sha1 sha2 pem pkcs1 curve25519 gmp x509 curl revocation addrblock hmac vici kernel-netlink socket-default updown
|
||||||
|
|
||||||
|
syslog {
|
||||||
|
daemon {
|
||||||
|
default = 1
|
||||||
|
}
|
||||||
|
auth {
|
||||||
|
default = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
connections {
|
||||||
|
|
||||||
|
home {
|
||||||
|
local_addrs = fec0::10
|
||||||
|
remote_addrs = fec0::1
|
||||||
|
|
||||||
|
local {
|
||||||
|
auth = pubkey
|
||||||
|
certs = carolCert.pem
|
||||||
|
id = [email protected]
|
||||||
|
}
|
||||||
|
remote {
|
||||||
|
auth = pubkey
|
||||||
|
id = moon.strongswan.org
|
||||||
|
}
|
||||||
|
children {
|
||||||
|
home {
|
||||||
|
remote_ts = 0::0/0
|
||||||
|
|
||||||
|
updown = /usr/local/libexec/ipsec/_updown iptables
|
||||||
|
esp_proposals = aes128-sha256-x25519
|
||||||
|
}
|
||||||
|
}
|
||||||
|
version = 2
|
||||||
|
proposals = aes128-sha256-x25519
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
authorities {
|
||||||
|
strongswan {
|
||||||
|
cacert = strongswanCert.pem
|
||||||
|
crl_uris = http://ip6-winnetou.strongswan.org/strongswan_rfc3779.crl
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
|
||||||
|
|
||||||
config setup
|
|
||||||
|
|
||||||
ca strongswan
|
|
||||||
cacert=strongswanCert.pem
|
|
||||||
certuribase=http://ip6-winnetou.strongswan.org/certs/rfc3779/
|
|
||||||
crluri=http://ip6-winnetou.strongswan.org/strongswan_rfc3779.crl
|
|
||||||
auto=add
|
|
||||||
|
|
||||||
conn %default
|
|
||||||
ikelifetime=60m
|
|
||||||
keylife=20m
|
|
||||||
rekeymargin=3m
|
|
||||||
keyingtries=1
|
|
||||||
|
|
||||||
conn home
|
|
||||||
left=PH_IP6_DAVE
|
|
||||||
leftcert=daveCert.pem
|
|
||||||
[email protected]
|
|
||||||
leftfirewall=yes
|
|
||||||
right=PH_IP6_MOON
|
|
||||||
[email protected]
|
|
||||||
rightsubnet=0::0/0
|
|
||||||
keyexchange=ikev2
|
|
||||||
auto=add
|
|
||||||
@@ -1,6 +1,18 @@
|
|||||||
# /etc/strongswan.conf - strongSwan configuration file
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
charon {
|
swanctl {
|
||||||
hash_and_url = yes
|
load = pem pkcs1 x509 revocation constraints pubkey openssl random
|
||||||
load = random nonce aes sha1 sha2 pem pkcs1 curve25519 gmp x509 curl revocation addrblock hmac stroke kernel-netlink socket-default updown
|
}
|
||||||
|
|
||||||
|
charon-systemd {
|
||||||
|
load = random nonce aes sha1 sha2 pem pkcs1 curve25519 gmp x509 curl revocation addrblock hmac vici kernel-netlink socket-default updown
|
||||||
|
|
||||||
|
syslog {
|
||||||
|
daemon {
|
||||||
|
default = 1
|
||||||
|
}
|
||||||
|
auth {
|
||||||
|
default = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
connections {
|
||||||
|
|
||||||
|
home {
|
||||||
|
local_addrs = fec0::20
|
||||||
|
remote_addrs = fec0::1
|
||||||
|
|
||||||
|
local {
|
||||||
|
auth = pubkey
|
||||||
|
certs = daveCert.pem
|
||||||
|
id = [email protected]
|
||||||
|
}
|
||||||
|
remote {
|
||||||
|
auth = pubkey
|
||||||
|
id = moon.strongswan.org
|
||||||
|
}
|
||||||
|
children {
|
||||||
|
home {
|
||||||
|
remote_ts = 0::0/0
|
||||||
|
|
||||||
|
updown = /usr/local/libexec/ipsec/_updown iptables
|
||||||
|
esp_proposals = aes128-sha256-x25519
|
||||||
|
}
|
||||||
|
}
|
||||||
|
version = 2
|
||||||
|
proposals = aes128-sha256-x25519
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
authorities {
|
||||||
|
strongswan {
|
||||||
|
cacert = strongswanCert.pem
|
||||||
|
crl_uris = http://ip6-winnetou.strongswan.org/strongswan_rfc3779.crl
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
|
||||||
|
|
||||||
config setup
|
|
||||||
|
|
||||||
ca strongswan
|
|
||||||
cacert=strongswanCert.pem
|
|
||||||
certuribase=http://ip6-winnetou.strongswan.org/certs/rfc3779/
|
|
||||||
crluri=http://ip6-winnetou.strongswan.org/strongswan_rfc3779.crl
|
|
||||||
auto=add
|
|
||||||
|
|
||||||
conn %default
|
|
||||||
ikelifetime=60m
|
|
||||||
keylife=20m
|
|
||||||
rekeymargin=3m
|
|
||||||
keyingtries=1
|
|
||||||
|
|
||||||
conn rw
|
|
||||||
left=PH_IP6_MOON
|
|
||||||
leftcert=moonCert.pem
|
|
||||||
[email protected]
|
|
||||||
leftsubnet=fec1::/16
|
|
||||||
leftfirewall=yes
|
|
||||||
right=%any
|
|
||||||
keyexchange=ikev2
|
|
||||||
auto=add
|
|
||||||
@@ -1,6 +1,18 @@
|
|||||||
# /etc/strongswan.conf - strongSwan configuration file
|
# /etc/strongswan.conf - strongSwan configuration file
|
||||||
|
|
||||||
charon {
|
swanctl {
|
||||||
hash_and_url = yes
|
load = pem pkcs1 x509 revocation constraints pubkey openssl random
|
||||||
load = random nonce aes sha1 sha2 pem pkcs1 curve25519 gmp x509 curl revocation addrblock hmac stroke kernel-netlink socket-default updown
|
}
|
||||||
|
|
||||||
|
charon-systemd {
|
||||||
|
load = random nonce aes sha1 sha2 pem pkcs1 curve25519 gmp x509 curl revocation addrblock hmac vici kernel-netlink socket-default updown
|
||||||
|
|
||||||
|
syslog {
|
||||||
|
daemon {
|
||||||
|
default = 1
|
||||||
|
}
|
||||||
|
auth {
|
||||||
|
default = 0
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
connections {
|
||||||
|
|
||||||
|
rw {
|
||||||
|
local_addrs = fec0::1
|
||||||
|
|
||||||
|
local {
|
||||||
|
auth = pubkey
|
||||||
|
certs = moonCert.pem
|
||||||
|
id = moon.strongswan.org
|
||||||
|
}
|
||||||
|
remote {
|
||||||
|
auth = pubkey
|
||||||
|
}
|
||||||
|
children {
|
||||||
|
net {
|
||||||
|
local_ts = fec1::0/16
|
||||||
|
|
||||||
|
updown = /usr/local/libexec/ipsec/_updown iptables
|
||||||
|
esp_proposals = aes128-sha256-x25519
|
||||||
|
}
|
||||||
|
}
|
||||||
|
version = 2
|
||||||
|
proposals = aes128-sha256-x25519
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
authorities {
|
||||||
|
strongswan {
|
||||||
|
cacert = strongswanCert.pem
|
||||||
|
crl_uris = http://ip6-winnetou.strongswan.org/strongswan_rfc3779.crl
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
moon::ipsec stop
|
moon::systemctl stop strongswan-swanctl
|
||||||
carol::ipsec stop
|
carol::systemctl stop strongswan-swanctl
|
||||||
dave::ipsec stop
|
dave::systemctl stop strongswan-swanctl
|
||||||
moon::iptables-restore < /etc/iptables.flush
|
moon::iptables-restore < /etc/iptables.flush
|
||||||
carol::iptables-restore < /etc/iptables.flush
|
carol::iptables-restore < /etc/iptables.flush
|
||||||
dave::iptables-restore < /etc/iptables.flush
|
dave::iptables-restore < /etc/iptables.flush
|
||||||
|
|||||||
@@ -7,11 +7,11 @@ dave::ip6tables-restore < /etc/ip6tables.rules
|
|||||||
alice::"ip route add fec0:\:/16 via fec1:\:1"
|
alice::"ip route add fec0:\:/16 via fec1:\:1"
|
||||||
carol::"ip route add fec1:\:/16 via fec0:\:1"
|
carol::"ip route add fec1:\:/16 via fec0:\:1"
|
||||||
dave::"ip route add fec1:\:/16 via fec0:\:1"
|
dave::"ip route add fec1:\:/16 via fec0:\:1"
|
||||||
moon::ipsec start
|
moon::systemctl start strongswan-swanctl
|
||||||
carol::ipsec start
|
carol::systemctl start strongswan-swanctl
|
||||||
dave::ipsec start
|
dave::systemctl start strongswan-swanctl
|
||||||
moon::expect-connection rw
|
moon::expect-connection rw
|
||||||
carol::expect-connection home
|
carol::expect-connection home
|
||||||
dave::expect-connection home
|
dave::expect-connection home
|
||||||
carol::ipsec up home
|
carol::swanctl --initiate --child home
|
||||||
dave::ipsec up home
|
dave::swanctl --initiate --child home
|
||||||
|
|||||||
@@ -23,3 +23,7 @@ IPSECHOSTS="moon carol dave"
|
|||||||
# IP protocol used by IPsec is IPv6
|
# IP protocol used by IPsec is IPv6
|
||||||
#
|
#
|
||||||
IPV6=1
|
IPV6=1
|
||||||
|
|
||||||
|
# charon controlled by swanctl
|
||||||
|
#
|
||||||
|
SWANCTL=1
|
||||||
|
|||||||
Reference in New Issue
Block a user