testing: Converted libipsec/net2net-cert-ipv6 to swanctl
This commit is contained in:
@@ -1,7 +1,5 @@
|
||||
moon::ipsec status 2> /dev/null::net-net.*ESTABLISHED.*moon.strongswan.org.*sun.strongswan.org::YES
|
||||
sun:: ipsec status 2> /dev/null::net-net.*ESTABLISHED.*sun.strongswan.org.*moon.strongswan.org::YES
|
||||
moon::ipsec status 2> /dev/null::net-net.*INSTALLED, TUNNEL::YES
|
||||
sun:: ipsec status 2> /dev/null::net-net.*INSTALLED, TUNNEL::YES
|
||||
alice::ping6 -c 3 -W 1 -i 0.2 -s 8184 -p deadbeef ip6-bob.strongswan.org::8192 bytes from ip6-bob.strongswan.org: icmp_seq=3::YES
|
||||
moon ::swanctl --list-sas --raw 2> /dev/null::gw-gw.*version=2 state=ESTABLISHED local-host=192.168.0.1 local-port=4500 local-id=moon.strongswan.org remote-host=192.168.0.2 remote-port=4500 remote-id=sun.strongswan.org initiator=yes.*nat-remote=yes nat-any=yes encr-alg=AES_CBC encr-keysize=256 integ-alg=HMAC_SHA2_384_192 prf-alg=PRF_HMAC_SHA2_384 dh-group=ECP_384.*child-sas.*net-net.*reqid=1 state=INSTALLED mode=TUNNEL protocol=ESP encap=yes.*encr-alg=AES_GCM_16 encr-keysize=256.*local-ts=\[fec1::/16\[ipv6-icmp]] remote-ts=\[fec2::/16\[ipv6-icmp]]::YES
|
||||
sun ::swanctl --list-sas --raw 2> /dev/null::gw-gw.*version=2 state=ESTABLISHED local-host=192.168.0.2 local-port=4500 local-id=sun.strongswan.org remote-host=192.168.0.1 remote-port=4500 remote-id=moon.strongswan.org.*nat-remote=yes nat-any=yes encr-alg=AES_CBC encr-keysize=256 integ-alg=HMAC_SHA2_384_192 prf-alg=PRF_HMAC_SHA2_384 dh-group=ECP_384.*child-sas.*net-net.*reqid=1 state=INSTALLED mode=TUNNEL protocol=ESP encap=yes.*encr-alg=AES_GCM_16 encr-keysize=256.*local-ts=\[fec2::/16\[ipv6-icmp]] remote-ts=\[fec1::/16\[ipv6-icmp]]::YES
|
||||
sun::tcpdump::IP moon.strongswan.org.\(4500\|ipsec-nat-t\) > sun.strongswan.org.\(4500\|ipsec-nat-t\): UDP-encap: ESP::YES
|
||||
sun::tcpdump::IP sun.strongswan.org.\(4500\|ipsec-nat-t\) > moon.strongswan.org.\(4500\|ipsec-nat-t\): UDP-encap: ESP::YES
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||
|
||||
config setup
|
||||
|
||||
conn %default
|
||||
ikelifetime=60m
|
||||
keylife=20m
|
||||
rekeymargin=3m
|
||||
keyingtries=1
|
||||
keyexchange=ikev2
|
||||
mobike=no
|
||||
|
||||
conn net-net
|
||||
left=PH_IP_MOON
|
||||
leftcert=moonCert.pem
|
||||
[email protected]
|
||||
leftsubnet=fec1::0/16[ipv6-icmp]
|
||||
leftupdown=/etc/updown
|
||||
right=PH_IP_SUN
|
||||
[email protected]
|
||||
rightsubnet=fec2::0/16[ipv6-icmp]
|
||||
auto=add
|
||||
@@ -1,6 +1,19 @@
|
||||
# /etc/strongswan.conf - strongSwan configuration file
|
||||
|
||||
charon {
|
||||
load = random nonce aes sha1 sha2 pem pkcs1 curve25519 gmp x509 curl revocation hmac stroke kernel-libipsec kernel-netlink socket-default updown
|
||||
swanctl {
|
||||
load = pem pkcs1 x509 revocation constraints pubkey openssl random
|
||||
}
|
||||
|
||||
charon-systemd {
|
||||
load = random nonce pem pkcs1 x509 openssl curl revocation vici kernel-libipsec kernel-netlink socket-default updown
|
||||
|
||||
syslog {
|
||||
daemon {
|
||||
default = 1
|
||||
}
|
||||
auth {
|
||||
default = 0
|
||||
}
|
||||
}
|
||||
multiple_authentication = no
|
||||
}
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
connections {
|
||||
|
||||
gw-gw {
|
||||
local_addrs = 192.168.0.1
|
||||
remote_addrs = 192.168.0.2
|
||||
|
||||
local {
|
||||
auth = pubkey
|
||||
certs = moonCert.pem
|
||||
id = moon.strongswan.org
|
||||
}
|
||||
remote {
|
||||
auth = pubkey
|
||||
id = sun.strongswan.org
|
||||
}
|
||||
children {
|
||||
net-net {
|
||||
local_ts = fec1::0/16[ipv6-icmp]
|
||||
remote_ts = fec2::0/16[ipv6-icmp]
|
||||
|
||||
updown = /etc/updown
|
||||
esp_proposals = aes256gcm128-ecp384
|
||||
}
|
||||
}
|
||||
version = 2
|
||||
mobike = no
|
||||
proposals = aes256-sha384-ecp384
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
# /etc/ipsec.conf - strongSwan IPsec configuration file
|
||||
|
||||
config setup
|
||||
|
||||
conn %default
|
||||
ikelifetime=60m
|
||||
keylife=20m
|
||||
rekeymargin=3m
|
||||
keyingtries=1
|
||||
keyexchange=ikev2
|
||||
mobike=no
|
||||
|
||||
conn net-net
|
||||
left=PH_IP_SUN
|
||||
leftcert=sunCert.pem
|
||||
[email protected]
|
||||
leftsubnet=fec2::0/16[ipv6-icmp]
|
||||
leftupdown=/etc/updown
|
||||
right=PH_IP_MOON
|
||||
[email protected]
|
||||
rightsubnet=fec1::0/16[ipv6-icmp]
|
||||
auto=add
|
||||
@@ -1,6 +1,19 @@
|
||||
# /etc/strongswan.conf - strongSwan configuration file
|
||||
|
||||
charon {
|
||||
load = random nonce aes sha1 sha2 pem pkcs1 curve25519 gmp x509 curl revocation hmac stroke kernel-libipsec kernel-netlink socket-default updown
|
||||
swanctl {
|
||||
load = pem pkcs1 x509 revocation constraints pubkey openssl random
|
||||
}
|
||||
|
||||
charon-systemd {
|
||||
load = random nonce pem pkcs1 x509 openssl curl revocation vici kernel-libipsec kernel-netlink socket-default updown
|
||||
|
||||
syslog {
|
||||
daemon {
|
||||
default = 1
|
||||
}
|
||||
auth {
|
||||
default = 0
|
||||
}
|
||||
}
|
||||
multiple_authentication = no
|
||||
}
|
||||
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
connections {
|
||||
|
||||
gw-gw {
|
||||
local_addrs = 192.168.0.2
|
||||
remote_addrs = 192.168.0.1
|
||||
|
||||
local {
|
||||
auth = pubkey
|
||||
certs = sunCert.pem
|
||||
id = sun.strongswan.org
|
||||
}
|
||||
remote {
|
||||
auth = pubkey
|
||||
id = moon.strongswan.org
|
||||
}
|
||||
children {
|
||||
net-net {
|
||||
local_ts = fec2::0/16[ipv6-icmp]
|
||||
remote_ts = fec1::0/16[ipv6-icmp]
|
||||
|
||||
updown = /etc/updown
|
||||
esp_proposals = aes256gcm128-ecp384
|
||||
}
|
||||
}
|
||||
version = 2
|
||||
mobike = no
|
||||
proposals = aes256-sha384-ecp384
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
moon::ipsec stop
|
||||
sun::ipsec stop
|
||||
moon::swanctl --terminate --ike gw-gw 2> /dev/null
|
||||
moon::systemctl stop strongswan-swanctl
|
||||
sun::systemctl stop strongswan-swanctl
|
||||
alice::"ip route del fec2:\:/16 via fec1:\:1"
|
||||
moon::"ip route del fec2:\:/16 via fec0:\:2"
|
||||
sun::"ip route del fec1:\:/16 via fec0:\:1"
|
||||
|
||||
@@ -4,8 +4,8 @@ alice::"ip route add fec2:\:/16 via fec1:\:1"
|
||||
moon::"ip route add fec2:\:/16 via fec0:\:2"
|
||||
sun::"ip route add fec1:\:/16 via fec0:\:1"
|
||||
bob::"ip route add fec1:\:/16 via fec2:\:1"
|
||||
sun::ipsec start
|
||||
moon::ipsec start
|
||||
sun::expect-connection net-net
|
||||
moon::expect-connection net-net
|
||||
moon::ipsec up net-net
|
||||
moon::systemctl start strongswan-swanctl
|
||||
sun::systemctl start strongswan-swanctl
|
||||
moon::expect-connection gw-gw
|
||||
sun::expect-connection gw-gw
|
||||
moon::swanctl --initiate --child net-net 2> /dev/null
|
||||
|
||||
@@ -19,3 +19,7 @@ TCPDUMPHOSTS="sun"
|
||||
# Used for IPsec logging purposes
|
||||
#
|
||||
IPSECHOSTS="moon sun"
|
||||
|
||||
# charon controlled by swanctl
|
||||
#
|
||||
SWANCTL=1
|
||||
|
||||
Reference in New Issue
Block a user