I extended my tests from small internal test system with same environments to a real environment with real machines.
On the one site I have a OpenWRT router with UMTS Dongle (strongSwan U5.3.3/K3.18.23) and on the other site a IPCop router (Openswan U2.6.42/K3.4-3).
And now the basic connection work but the difference between Openswan and strongSwan seems a bit big.
Server log
00:35:58 pluto[22991] | found connection: Clubnetwork
00:35:58 pluto[22991] "Clubnetwork" #1: transition from state STATE_IKEv2_START to state STATE_PARENT_R1
00:35:58 pluto[22991] "Clubnetwork" #1: STATE_PARENT_R1: received v2I1, sent v2R1 {auth=IKEv2 cipher=aes_128 integ=sha1_96 prf=oakley_sha group=modp1536}
00:35:58 pluto[22991] "Clubnetwork" #1: new NAT mapping for #1, was 89.138.138.138:500, now 89.138.138.138:36810
00:35:58 pluto[22991] "Clubnetwork" #1: IKEv2 mode peer ID is ID_FQDN: '@club.dyndns.org'
00:35:58 pluto[22991] | CHILD SA proposals received
00:35:58 pluto[22991] "Clubnetwork" #1: PAUL: this is where we have to check the TSi/TSr
00:35:58 pluto[22991] | printing contents struct traffic_selector
00:35:58 pluto[22991] | ts_type: IKEv2_TS_IPV4_ADDR_RANGE
00:35:58 pluto[22991] | ipprotoid: 0
00:35:58 pluto[22991] | startport: 0
00:35:58 pluto[22991] | endport: 65535
00:35:58 pluto[22991] | ip low: 172.16.1.0
00:35:58 pluto[22991] | ip high: 172.16.1.255
00:35:58 pluto[22991] | printing contents struct traffic_selector
00:35:58 pluto[22991] | ts_type: IKEv2_TS_IPV4_ADDR_RANGE
00:35:58 pluto[22991] | ipprotoid: 0
00:35:58 pluto[22991] | startport: 0
00:35:58 pluto[22991] | endport: 65535
00:35:58 pluto[22991] | ip low: 192.168.1.0
00:35:58 pluto[22991] | ip high: 192.168.1.255
00:35:58 ipsec up-client
00:35:58 ipsec prepare-client
00:35:58 ipsec route-client
00:35:58 pluto[22991] "Clubnetwork" #2: transition from state STATE_PARENT_R1 to state STATE_PARENT_R2
00:35:58 pluto[22991] "Clubnetwork" #2: negotiated tunnel [172.16.1.0,172.16.1.255:0-65535 0] -> [192.168.1.0,192.168.1.255:0-65535 0]
00:35:58 pluto[22991] "Clubnetwork" #2: STATE_PARENT_R2: received v2I2, PARENT SA established tunnel mode {ESP=>0xc143ae5d <0x9f2e747b xfrm=AES_128-HMAC_SHA1 NATOA=none NATD=89.138.138.138:36810 DPD=none}
00:35:58 pluto[22991] | releasing whack for #2 (sock=-1)
00:35:58 pluto[22991] | releasing whack for #1 (sock=-1)
00:36:28 pluto[22991] "Clubnetwork" #1: transition from state STATE_PARENT_R2 to state STATE_PARENT_R2
00:36:28 pluto[22991] "Clubnetwork" #1: STATE_PARENT_R2: received v2I2, PARENT SA established
00:36:58 pluto[22991] "Clubnetwork" #1: transition from state STATE_PARENT_R2 to state STATE_PARENT_R2
00:36:58 pluto[22991] "Clubnetwork" #1: STATE_PARENT_R2: received v2I2, PARENT SA established
00:37:28 pluto[22991] "Clubnetwork" #1: transition from state STATE_PARENT_R2 to state STATE_PARENT_R2
00:37:28 pluto[22991] "Clubnetwork" #1: STATE_PARENT_R2: received v2I2, PARENT SA established
00:37:58 pluto[22991] "Clubnetwork" #1: transition from state STATE_PARENT_R2 to state STATE_PARENT_R2
00:37:58 pluto[22991] "Clubnetwork" #1: STATE_PARENT_R2: received v2I2, PARENT SA established
00:38:28 pluto[22991] "Clubnetwork" #1: transition from state STATE_PARENT_R2 to state STATE_PARENT_R2
00:38:28 pluto[22991] "Clubnetwork" #1: STATE_PARENT_R2: received v2I2, PARENT SA established
00:38:58 pluto[22991] "Clubnetwork" #1: transition from state STATE_PARENT_R2 to state STATE_PARENT_R2
00:38:58 pluto[22991] "Clubnetwork" #1: STATE_PARENT_R2: received v2I2, PARENT SA established
00:39:28 pluto[22991] "Clubnetwork" #1: transition from state STATE_PARENT_R2 to state STATE_PARENT_R2
00:39:28 pluto[22991] "Clubnetwork" #1: STATE_PARENT_R2: received v2I2, PARENT SA established
00:39:58 pluto[22991] "Clubnetwork" #1: transition from state STATE_PARENT_R2 to state STATE_PARENT_R2
00:39:58 pluto[22991] "Clubnetwork" #1: STATE_PARENT_R2: received v2I2, PARENT SA established
Client log
root@OpenWrt:~# ipsec start
no files found matching '/etc/strongswan.d/*.conf'
Starting strongSwan 5.3.3 IPsec [starter]...
root@OpenWrt:~# ipsec up Clubnetwork
no files found matching '/etc/strongswan.d/*.conf'
initiating IKE_SA Clubnetwork[1] to 144.76.76.76
generating IKE_SA_INIT request 0 [ SA KE No N(NATD_S_IP) N(NATD_D_IP) N(HASH_ALG) ]
sending packet: from 192.168.1.1[500] to 144.76.76.76[500] (896 bytes)
received packet: from 144.76.76.76[500] to 192.168.1.1[500] (312 bytes)
parsed IKE_SA_INIT response 0 [ SA KE No V ]
received unknown vendor ID: 4f:53:57:51:62:4a:4a:4a:4a:4a:4a:4a
authentication of 'club.dyndns.org' (myself) with pre-shared key
establishing CHILD_SA Clubnetwork
generating IKE_AUTH request 1 [ IDi IDr AUTH SA TSi TSr N(MOBIKE_SUP) N(ADD_4_ADDR) N(ADD_6_ADDR) N(EAP_ONLY) ]
sending packet: from 192.168.1.1[500] to 144.76.76.76[500] (508 bytes)
received packet: from 144.76.76.76[500] to 192.168.1.1[500] (220 bytes)
parsed IKE_AUTH response 1 [ IDr AUTH SA TSi TSr ]
authentication of 'server.dyndns.org' with pre-shared key successful
IKE_SA Clubnetwork[1] established between 192.168.1.1[club.dyndns.org]...144.76.76.76[server.dyndns.org]
scheduling reauthentication in 3011s
maximum IKE_SA lifetime 3551s
received netlink error: Network is unreachable (128)
unable to install source route for 192.168.1.1
received netlink error: Network is unreachable (128)
unable to install source route for 192.168.1.1
connection 'Clubnetwork' established successfully
As you can see: received netlink error: Network is unreachable (128)
root@OpenWrt:~# ipsec statusall
no files found matching '/etc/strongswan.d/*.conf'
Status of IKE charon daemon (strongSwan 5.3.3, Linux 3.18.23, mips):
uptime: 14 minutes, since Jan 31 23:39:04 2017
malloc: sbrk 139264, mmap 0, used 119856, free 19408
worker threads: 11 of 16 idle, 5/0/0/0 working, job queue: 0/0/0/0, scheduled: 3
loaded plugins: charon aes des rc2 sha1 sha2 md5 random nonce x509 revocation constraints pubkey pkcs1 pgp dnskey sshkey pem fips-prf gmp xcbc hmac attr kernel-netlink resolve socket-default stroke updown xauth-generic
Virtual IP pools (size/online/offline):
172.16.1.254: 1/0/0
Listening IP addresses:
192.168.1.1
fd2a:932d:396b::1
192.168.0.100
Connections:
Clubnetwork: 192.168.1.1...server.dyndns.org IKEv1/2, dpddelay=30s
Clubnetwork: local: [club.dyndns.org] uses pre-shared key authentication
Clubnetwork: remote: [server.dyndns.org] uses pre-shared key authentication
Clubnetwork: child: 192.168.1.0/24 === 172.16.1.0/24 TUNNEL, dpdaction=restart
Security Associations (1 up, 0 connecting):
Clubnetwork[1]: ESTABLISHED 13 minutes ago, 192.168.1.1[club.dyndns.org]...144.76.76.76[server.dyndns.org]
Clubnetwork[1]: IKEv2 SPIs: 592e2b75823f467e_i* ae4d1c0090f82f0b_r, pre-shared key reauthentication in 36 minutes
Clubnetwork[1]: IKE proposal: AES_CBC_128/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_1536
Clubnetwork{1}: INSTALLED, TUNNEL, reqid 1, ESP SPIs: c143ae5d_i 9f2e747b_o
Clubnetwork{1}: AES_CBC_128/HMAC_SHA1_96, 0 bytes_i, 0 bytes_o, rekeying in 7 hours
Clubnetwork{1}: 192.168.1.0/24 === 172.16.1.0/24
Server ipsec.conf
# Do not modify 'ipsec.conf' directly since any changes you make will be
# overwritten whenever you change IPsec settings using the web interface!
#
version 2.0
config setup
protostack=netkey
klipsdebug="none"
plutodebug="none"
uniqueids=yes
nat_traversal=yes
virtual_private=%v4:10.0.0.0/8,%v4:172.16.0.0/12,%v4:192.168.0.0/16,%v4:!172.16.1.0/255.255.255.0,%v4:!192.168.1.0/24
conn %default
keyingtries=0
disablearrivalcheck=no
leftupdown=/usr/local/bin/ipsecupdown.sh
#
# net-2-net to RED
conn Clubnetwork
left=server.dyndns.org
leftsubnet=172.16.1.0/24
right=89.204.138.213
rightsubnet=192.168.1.0/24
leftid="@server.dyndns.org"
rightid="@club.dyndns.org"
ike=aes128-sha-modp1536,aes128-sha-modp1024,aes128-md5-modp1536,aes128-md5-modp1024,3des-sha-modp1536,3des-sha-modp1024,3des-md5-modp1536,3des-md5-modp1024
esp=aes128-sha1,aes128-md5,3des-sha1,3des-md5
ikelifetime=1h
keylife=8h
dpddelay=30
dpdtimeout=120
dpdaction=hold
pfs=no
authby=secret
auto=add
I copied the configuration from server to client and changed right and left. Then on start I got a few "deprecated" warnings which I removed from the client configuration.
Is this maybe a problem because I can't forward ports on the UMTS dongle site?
The server have opened IPSec ports - but the LTE Stick / UMTS Dongle is not able to have opened ports.
But why the client says he is connected and the server said the client isn't connected?
Hey guys,
I extended my tests from small internal test system with same environments to a real environment with real machines. On the one site I have a OpenWRT router with UMTS Dongle (strongSwan U5.3.3/K3.18.23) and on the other site a IPCop router (Openswan U2.6.42/K3.4-3).
The local test works after @letoams helped me. Thanks again. https://github.com/xelerance/Openswan/issues/225
And now the basic connection work but the difference between Openswan and strongSwan seems a bit big.
Server log
Client log
As you can see: received netlink error: Network is unreachable (128)
Server status
Client status
Server ipsec.conf
Client ipsec.conf
I copied the configuration from server to client and changed
right
andleft
. Then on start I got a few "deprecated" warnings which I removed from the client configuration.Is this maybe a problem because I can't forward ports on the UMTS dongle site? The server have opened IPSec ports - but the LTE Stick / UMTS Dongle is not able to have opened ports. But why the client says he is connected and the server said the client isn't connected?