0 K A T local-cert local-cert
1 K A T webfig 10.0.x.xxx
2 KLA T ca ca
3 K I TesTikDE 10.0.x.xxx IP:10.0.x.xxx
4 K I TestFlap TestFlap
5 K R TesTikDE_outside 80.aaa.bbb.cc IP:80.aaa.bbb.cc
6 K R TesTikDE_dns myname.ourdomain.de
7 KLA T ca_outside ca_outside
8 KLA T ca_dns ca_dns
9 K I TesTikDE_outside2 80.aaa.bbb.cc IP:80.aaa.bbb.cc
10 K I TesTikDE_dns2 myname.ourdomain.de
# 2025-02-05 19:23:02 by RouterOS 7.16.2
# software id = GKW7-GIGP
# model = RB760iGS
/ip ipsec mode-config
add address-pool=TSDE_vpnpool address-prefix-length=32 name=ike2-conf
/ip ipsec policy group
add name=ike2-policies
/ip ipsec profile
set [ find default=yes ] dh-group=x25519,ecp384,ecp521 dpd-interval=2m dpd-maximum-failures=5 enc-algorithm=aes-256 hash-algorithm=sha512 prf-algorithm=sha512 proposal-check=strict
add dh-group=x25519,ecp256,ecp384,ecp521,modp8192,modp6144,modp4096,modp3072,modp2048 enc-algorithm=aes-256,aes-192,aes-128 hash-algorithm=sha256 name=TStest_IKEv2_ph1
/ip ipsec peer
add exchange-mode=ike2 name=peer1 passive=yes profile=TStest_IKEv2_ph1
/ip ipsec proposal
set [ find default=yes ] auth-algorithms=sha512,sha256 disabled=yes enc-algorithms=chacha20poly1305,aes-256-cbc,aes-256-gcm pfs-group=ecp521
add auth-algorithms=sha512,sha256 enc-algorithms=chacha20poly1305,aes-256-cbc,aes-256-ctr,aes-256-gcm,aes-192-cbc,aes-192-ctr,aes-192-gcm,aes-128-cbc,aes-128-gcm name=TStest_IKEv2_ph2 pfs-group=none
/ip ipsec identity
add auth-method=digital-signature certificate=TesTikDE_dns generate-policy=port-strict match-by=certificate mode-config=ike2-conf peer=peer1 policy-template-group=ike2-policies remote-certificate=TestFlap remote-id=ignore
/ip ipsec policy
set 0 disabled=yes
add dst-address=10.0.x.0/24 group=ike2-policies proposal=TStest_IKEv2_ph2 src-address=0.0.0.0/0 template=yes
The ability to use ESP encapsulation into UDP and related stuff to traverse NAT is a capability of IPsec as a protocol; not accepting a responder behind NAT is a default behavior of the Windows embedded VPN client (at least in the L2TP/IPsec mode) that can be changed.Interested in what u mean by the behind-NAT-trick. I'm using 500/4500 nat-traversal now.
It is. Without the ability of the initiator to verify that it is connecting to the correct server, a MITM or an impersonator could harvest the usernames and passwords.The server authentication is not very important
Except RouterOS and Strongswan, I haven't seen any IKEv2 implementation yet that would support PSK.I had in mind to start with PSK-only but that didnt turn out to be so easy...
The embedded client of Windows has just two possibilities:which auth-method should i choose now (w/o radius) on both sides, to start with ?
Just as a little factoid, I have IKEv2 with PSK authentication working between RouterOS and a Fortigate.Except RouterOS and Strongswan, I haven't seen any IKEv2 implementation yet that would support PSK.
...and this, kids, is what happens when you lose concentration when postingJust as a little factoidExcept RouterOS and Strongswan, I haven't seen any IKEv2 implementation yet that would support PSK.
0 K A T local-cert local-cert
1 K A T webfig 10.0.x.xxx
2 KLA T ca ca
3 K I TesTikDE 10.0.x.xxx IP:10.0.x.xxx
......
/certificate
add common-name=CA name=CA key-size=4096 days-valid=3650
sign CA ca-crl-host=remote.somewhere.at
add common-name=1.2.3.4 subject-alt-name=DNS:remote.somewhere.at key-size=4096 key-usage=tls-server name=MyVPN days-valid=800
sign MyVPN ca=CA
add common-name=User1 subject-alt-name=DNS:User.Company key-size=4096 key-usage=tls-client name=User1 days-valid=800
sign User1 ca=CA
/ip ipsec identity
add auth-method=digital-signature certificate=MyVPN,CA generate-policy=port-strict mode-config=ike2-conf peer=ike2 policy-template-group=ike2-policies
12:17:39 ipsec -> ike2 request, exchange: SA_INIT:0 vpn.client.public.ip[64619] xxxxxxxxxxxxxxxx:0000000000000000
12:17:39 ipsec ike2 respond
12:17:39 ipsec payload seen: SA
12:17:39 ipsec payload seen: KE
12:17:39 ipsec payload seen: NONCE
12:17:39 ipsec payload seen: NOTIFY
12:17:39 ipsec payload seen: NOTIFY
12:17:39 ipsec payload seen: NOTIFY
12:17:39 ipsec payload seen: VID
12:17:39 ipsec payload seen: VID
12:17:39 ipsec payload seen: VID
12:17:39 ipsec payload seen: VID
12:17:39 ipsec processing payload: SA
12:17:39 ipsec IKE Protocol: IKE
12:17:39 ipsec proposal #1
12:17:39 ipsec enc: 3des-cbc
12:17:39 ipsec prf: hmac-sha1
12:17:39 ipsec auth: sha1
12:17:39 ipsec dh: modp1024
12:17:39 ipsec proposal #2
12:17:39 ipsec enc: aes256-cbc
12:17:39 ipsec prf: hmac-sha1
12:17:39 ipsec auth: sha1
12:17:39 ipsec dh: modp1024
12:17:39 ipsec proposal #3
12:17:39 ipsec enc: 3des-cbc
12:17:39 ipsec prf: hmac-sha256
12:17:39 ipsec auth: sha256
12:17:39 ipsec dh: modp1024
12:17:39 ipsec proposal #4
12:17:39 ipsec enc: aes256-cbc
12:17:39 ipsec prf: hmac-sha256
12:17:39 ipsec auth: sha256
12:17:39 ipsec dh: modp1024
12:17:39 ipsec proposal #5
12:17:39 ipsec enc: 3des-cbc
12:17:39 ipsec prf: hmac-sha384
12:17:39 ipsec auth: sha384
12:17:39 ipsec dh: modp1024
12:17:39 ipsec proposal #6
12:17:39 ipsec enc: aes256-cbc
12:17:39 ipsec prf: hmac-sha384
12:17:39 ipsec auth: sha384
12:17:39 ipsec dh: modp1024
12:17:39 ipsec matched proposal:
12:17:39 ipsec proposal #4
12:17:39 ipsec enc: aes256-cbc
12:17:39 ipsec prf: hmac-sha256
12:17:39 ipsec auth: sha256
12:17:39 ipsec dh: modp1024
12:17:39 ipsec processing payload: KE
12:17:39 ipsec ike2 respond finish: request, exchange: SA_INIT:0 vpn.client.public.ip[64619] xxxxxxxxxxxxxxxx:0000000000000000
12:17:39 ipsec processing payload: NONCE
12:17:39 ipsec adding payload: SA
12:17:39 ipsec adding payload: KE
12:17:39 ipsec adding payload: NONCE
12:17:39 ipsec adding notify: NAT_DETECTION_SOURCE_IP
12:17:39 ipsec adding notify: NAT_DETECTION_DESTINATION_IP
12:17:39 ipsec adding notify: IKEV2_FRAGMENTATION_SUPPORTED
12:17:39 ipsec adding payload: CERTREQ
12:17:39 ipsec <- ike2 reply, exchange: SA_INIT:0 vpn.client.public.ip[64619] xxxxxxxxxxxxxxxx:yyyyyyyyyyyyyyyy
12:17:39 ipsec,info new ike2 SA (R): ike2-responder mikro.tik.local.ip[500]-vpn.client.public.ip[64619] spi:yyyyyyyyyyyyyyyy:xxxxxxxxxxxxxxxx
12:17:39 ipsec processing payloads: VID
12:17:39 ipsec peer is MS Windows (ISAKMPOAKLEY 9)
12:17:39 ipsec processing payloads: NOTIFY
12:17:39 ipsec notify: IKEV2_FRAGMENTATION_SUPPORTED
12:17:39 ipsec notify: NAT_DETECTION_SOURCE_IP
12:17:39 ipsec notify: NAT_DETECTION_DESTINATION_IP
12:17:39 ipsec (NAT-T) REMOTE
12:17:39 ipsec KA list add: mikro.tik.local.ip[4500]->vpn.client.public.ip[64619]
12:17:39 ipsec fragmentation negotiated
12:17:39 ipsec -> ike2 request, exchange: AUTH:1 vpn.client.public.ip[64620] xxxxxxxxxxxxxxxx:yyyyyyyyyyyyyyyy
12:17:39 ipsec peer ports changed: 64619 -> 64620
12:17:39 ipsec KA remove: mikro.tik.local.ip[4500]->vpn.client.public.ip[64619]
12:17:39 ipsec KA list add: mikro.tik.local.ip[4500]->vpn.client.public.ip[64620]
12:17:39 ipsec payload seen: SKF
12:17:39 ipsec processing payload: ENC (not found)
12:17:39 ipsec processing payload: SKF
12:17:39 ipsec -> ike2 request, exchange: AUTH:1 vpn.client.public.ip[64620] xxxxxxxxxxxxxxxx:yyyyyyyyyyyyyyyy
12:17:39 ipsec payload seen: SKF
12:17:39 ipsec processing payload: ENC (not found)
12:17:39 ipsec processing payload: SKF
12:17:39 ipsec -> ike2 request, exchange: AUTH:1 vpn.client.public.ip[64620] xxxxxxxxxxxxxxxx:yyyyyyyyyyyyyyyy
12:17:39 ipsec payload seen: SKF
12:17:39 ipsec processing payload: ENC (not found)
12:17:39 ipsec processing payload: SKF
12:17:39 ipsec payload seen: ID_I
12:17:39 ipsec payload seen: CERTREQ
12:17:39 ipsec payload seen: NOTIFY
12:17:39 ipsec payload seen: CONFIG
12:17:39 ipsec payload seen: SA
12:17:39 ipsec payload seen: TS_I
12:17:39 ipsec payload seen: TS_R
12:17:39 ipsec processing payloads: NOTIFY
12:17:39 ipsec notify: MOBIKE_SUPPORTED
12:17:39 ipsec ike auth: respond
12:17:39 ipsec processing payload: ID_I
12:17:39 ipsec ID_I (ADDR4): vpn.client.local.ip
12:17:39 ipsec processing payload: ID_R (not found)
12:17:39 ipsec processing payload: AUTH (not found)
12:17:39 ipsec processing payloads: NOTIFY
12:17:39 ipsec notify: MOBIKE_SUPPORTED
12:17:39 ipsec ID_R (DER DN): CN=my.domainname.com
12:17:39 ipsec adding payload: ID_R
12:17:39 ipsec adding payload: AUTH
12:17:39 ipsec Certificate:
12:17:39 ipsec serialNr: <MyLetsEncryptCertificateSerialNumber>
12:17:39 ipsec issuer: <C=US, O=Let\'s Encrypt, CN=R11>
12:17:39 ipsec subject: <CN=my.domainname.com>
12:17:39 ipsec notBefore: Wed Feb 12 12:06:47 2025
12:17:39 ipsec notAfter: Tue May 13 12:06:46 2025
12:17:39 ipsec selfSigned:0
12:17:39 ipsec extensions:
12:17:39 ipsec key usage: digital-signature, key-encipherment
12:17:39 ipsec extended key usage: tls-server, tls-client
12:17:39 ipsec basic constraints: isCa: FALSE
12:17:39 ipsec subject key id: <MySubjectKeyId>
12:17:39 ipsec authority key id:<MyAuthorityKeyId>
12:17:39 ipsec subject alternative name:
12:17:39 ipsec DNS: my.domainname.com
12:17:39 ipsec signed with: SHA256+RSA
12:17:39 ipsec [RSA-PUBLIC]
12:17:39 ipsec modulus: <long hex>
12:17:39 ipsec publicExponent: 10001
12:17:39 ipsec adding payload: CERT
12:17:39 ipsec adding payload: EAP
12:17:39 ipsec <- ike2 reply, exchange: AUTH:1 vpn.client.public.ip[64620] xxxxxxxxxxxxxxxx:yyyyyyyyyyyyyyyy
12:17:39 ipsec fragmenting into 2 chunks
12:17:39 ipsec adding payload: SKF
12:17:39 ipsec adding payload: SKF
12:18:09 ipsec child negotiation timeout in state 2
12:18:09 ipsec,info killing ike2 SA: ike2-responder mikro.tik.local.ip[4500]-vpn.client.public.ip[64620] spi:yyyyyyyyyyyyyyyy:xxxxxxxxxxxxxxxx
12:18:09 ipsec KA remove: mikro.tik.local.ip[4500]->vpn.client.public.ip[64620]
12:19:01 ipsec -> ike2 request, exchange: SA_INIT:0 vpn.client.public.ip[64619] nnnnnnnnnnnnnnnn:0000000000000000
12:19:01 ipsec ike2 respond
12:19:01 ipsec payload seen: SA
12:19:01 ipsec payload seen: KE
12:19:01 ipsec payload seen: NONCE
12:19:01 ipsec payload seen: NOTIFY
12:19:01 ipsec payload seen: NOTIFY
12:19:01 ipsec payload seen: NOTIFY
12:19:01 ipsec payload seen: VID
12:19:01 ipsec payload seen: VID
12:19:01 ipsec payload seen: VID
12:19:01 ipsec payload seen: VID
12:19:01 ipsec processing payload: SA
12:19:01 ipsec IKE Protocol: IKE
12:19:01 ipsec proposal #1
12:19:01 ipsec enc: 3des-cbc
12:19:01 ipsec prf: hmac-sha1
12:19:01 ipsec auth: sha1
12:19:01 ipsec dh: modp1024
12:19:01 ipsec proposal #2
12:19:01 ipsec enc: aes256-cbc
12:19:01 ipsec prf: hmac-sha1
12:19:01 ipsec auth: sha1
12:19:01 ipsec dh: modp1024
12:19:01 ipsec proposal #3
12:19:01 ipsec enc: 3des-cbc
12:19:01 ipsec prf: hmac-sha256
12:19:01 ipsec auth: sha256
12:19:01 ipsec dh: modp1024
12:19:01 ipsec proposal #4
12:19:01 ipsec enc: aes256-cbc
12:19:01 ipsec prf: hmac-sha256
12:19:01 ipsec auth: sha256
12:19:01 ipsec dh: modp1024
12:19:01 ipsec proposal #5
12:19:01 ipsec enc: 3des-cbc
12:19:01 ipsec prf: hmac-sha384
12:19:01 ipsec auth: sha384
12:19:01 ipsec dh: modp1024
12:19:01 ipsec proposal #6
12:19:01 ipsec enc: aes256-cbc
12:19:01 ipsec prf: hmac-sha384
12:19:01 ipsec auth: sha384
12:19:01 ipsec dh: modp1024
12:19:01 ipsec matched proposal:
12:19:01 ipsec proposal #4
12:19:01 ipsec enc: aes256-cbc
12:19:01 ipsec prf: hmac-sha256
12:19:01 ipsec auth: sha256
12:19:01 ipsec dh: modp1024
12:19:01 ipsec processing payload: KE
12:19:01 ipsec ike2 respond finish: request, exchange: SA_INIT:0 vpn.client.public.ip[64619] mmmmmmmmmmmmmmmm:0000000000000000
12:19:01 ipsec processing payload: NONCE
12:19:01 ipsec adding payload: SA
12:19:01 ipsec adding payload: KE
12:19:01 ipsec adding payload: NONCE
12:19:01 ipsec adding notify: NAT_DETECTION_SOURCE_IP
12:19:01 ipsec adding notify: NAT_DETECTION_DESTINATION_IP
12:19:01 ipsec adding notify: IKEV2_FRAGMENTATION_SUPPORTED
12:19:01 ipsec adding payload: CERTREQ
12:19:01 ipsec <- ike2 reply, exchange: SA_INIT:0 vpn.client.public.ip[64619] mmmmmmmmmmmmmmmm:nnnnnnnnnnnnnnnn
12:19:01 ipsec,info new ike2 SA (R): ike2-responder mikro.tik.public.ip[500]-vpn.client.public.ip[64619] spi:nnnnnnnnnnnnnnnn:mmmmmmmmmmmmmmmm
12:19:01 ipsec processing payloads: VID
12:19:01 ipsec peer is MS Windows (ISAKMPOAKLEY 9)
12:19:01 ipsec processing payloads: NOTIFY
12:19:01 ipsec notify: IKEV2_FRAGMENTATION_SUPPORTED
12:19:01 ipsec notify: NAT_DETECTION_SOURCE_IP
12:19:01 ipsec notify: NAT_DETECTION_DESTINATION_IP
12:19:01 ipsec (NAT-T) REMOTE
12:19:01 ipsec KA list add: mikro.tik.public.ip[4500]->vpn.client.public.ip[64619]
12:19:01 ipsec fragmentation negotiated
12:19:01 ipsec -> ike2 request, exchange: AUTH:1 vpn.client.public.ip[64620] mmmmmmmmmmmmmmmm:nnnnnnnnnnnnnnnn
12:19:01 ipsec peer ports changed: 64619 -> 64620
12:19:01 ipsec KA remove: mikro.tik.public.ip[4500]->vpn.client.public.ip[64619]
12:19:01 ipsec KA list add: mikro.tik.public.ip[4500]->vpn.client.public.ip[64620]
12:19:01 ipsec payload seen: SKF
12:19:01 ipsec processing payload: ENC (not found)
12:19:01 ipsec processing payload: SKF
12:19:01 ipsec -> ike2 request, exchange: AUTH:1 vpn.client.public.ip[64620] mmmmmmmmmmmmmmmm:nnnnnnnnnnnnnnnn
12:19:01 ipsec payload seen: SKF
12:19:01 ipsec processing payload: ENC (not found)
12:19:01 ipsec processing payload: SKF
12:19:01 ipsec -> ike2 request, exchange: AUTH:1 vpn.client.public.ip[64620] mmmmmmmmmmmmmmmm:nnnnnnnnnnnnnnnn
12:19:01 ipsec payload seen: SKF
12:19:01 ipsec processing payload: ENC (not found)
12:19:01 ipsec processing payload: SKF
12:19:01 ipsec payload seen: ID_I
12:19:01 ipsec payload seen: CERTREQ
12:19:01 ipsec payload seen: NOTIFY
12:19:01 ipsec payload seen: CONFIG
12:19:01 ipsec payload seen: SA
12:19:01 ipsec payload seen: TS_I
12:19:01 ipsec payload seen: TS_R
12:19:01 ipsec processing payloads: NOTIFY
12:19:01 ipsec notify: MOBIKE_SUPPORTED
12:19:01 ipsec ike auth: respond
12:19:01 ipsec processing payload: ID_I
12:19:01 ipsec ID_I (ADDR4): vpn.client.local.ip
12:19:01 ipsec processing payload: ID_R (not found)
12:19:01 ipsec processing payload: AUTH (not found)
12:19:01 ipsec processing payloads: NOTIFY
12:19:01 ipsec notify: MOBIKE_SUPPORTED
12:19:01 ipsec ID_R (DER DN): CN=my.domainname.com
12:19:01 ipsec adding payload: ID_R
12:19:01 ipsec adding payload: AUTH
12:19:01 ipsec Certificate:
12:19:01 ipsec serialNr: <MyLetsEncryptCertificateSerialNumber>
12:19:01 ipsec issuer: <C=US, O=Let\'s Encrypt, CN=R11>
12:19:01 ipsec subject: <CN=my.domainname.com>
12:19:01 ipsec notBefore: Wed Feb 12 12:06:47 2025
12:19:01 ipsec notAfter: Tue May 13 12:06:46 2025
12:19:01 ipsec selfSigned:0
12:19:01 ipsec extensions:
12:19:01 ipsec key usage: digital-signature, key-encipherment
12:19:01 ipsec extended key usage: tls-server, tls-client
12:19:01 ipsec basic constraints: isCa: FALSE
12:19:01 ipsec subject key id: <MySubjectKeyId>
12:19:01 ipsec authority key id:<MyAuthorityKeyId>
12:19:01 ipsec subject alternative name:
12:19:01 ipsec DNS: my.domainname.com
12:19:01 ipsec signed with: SHA256+RSA
12:19:01 ipsec [RSA-PUBLIC]
12:19:01 ipsec modulus: <long hex>
12:19:01 ipsec publicExponent: 10001
12:19:01 ipsec adding payload: CERT
12:19:01 ipsec adding payload: EAP
12:19:01 ipsec <- ike2 reply, exchange: AUTH:1 vpn.client.public.ip[64620] mmmmmmmmmmmmmmmm:nnnnnnnnnnnnnnnn
12:19:01 ipsec fragmenting into 2 chunks
12:19:01 ipsec adding payload: SKF
12:19:01 ipsec adding payload: SKF
12:19:02 ipsec -> ike2 request, exchange: AUTH:1 vpn.client.public.ip[64620] mmmmmmmmmmmmmmmm:nnnnnnnnnnnnnnnn
12:19:02 ipsec retransmitting reply
12:19:02 ipsec -> ike2 request, exchange: AUTH:1 vpn.client.public.ip[64620] mmmmmmmmmmmmmmmm:nnnnnnnnnnnnnnnn
12:19:02 ipsec retransmitting reply
12:19:02 ipsec -> ike2 request, exchange: AUTH:1 vpn.client.public.ip[64620] mmmmmmmmmmmmmmmm:nnnnnnnnnnnnnnnn
12:19:02 ipsec retransmitting reply
12:19:03 ipsec -> ike2 request, exchange: AUTH:1 vpn.client.public.ip[64620] mmmmmmmmmmmmmmmm:nnnnnnnnnnnnnnnn
12:19:03 ipsec retransmitting reply
12:19:03 ipsec -> ike2 request, exchange: AUTH:1 vpn.client.public.ip[64620] mmmmmmmmmmmmmmmm:nnnnnnnnnnnnnnnn
12:19:03 ipsec retransmitting reply
12:19:03 ipsec -> ike2 request, exchange: AUTH:1 vpn.client.public.ip[64620] mmmmmmmmmmmmmmmm:nnnnnnnnnnnnnnnn
12:19:03 ipsec retransmitting reply
12:19:31 ipsec child negotiation timeout in state 2
12:19:31 ipsec,info killing ike2 SA: ike2-responder mikro.tik.public.ip[4500]-vpn.client.public.ip[64620] spi:nnnnnnnnnnnnnnnn:mmmmmmmmmmmmmmmm
12:19:31 ipsec KA remove: mikro.tik.public.ip[4500]->vpn.client.public.ip[64620]
@Guscht: Can't help, but a notice: It's 2025, IPsec is an old, outdated overcomplicated, error-prone dinosaur. If possible, use a modern technology like Wireguard.
If you use the trick with public address on the Mikrotik itself, it must be set as a local-address on the peer. The dst-nat rules are OK.I guess something is wrong there.
14:11:26 ipsec -> ike2 request, exchange: SA_INIT:0 vpn.client.public.ip[64691] nnnnnnnnnnnnnnnn:0000000000000000
14:11:26 ipsec ike2 respond
14:11:26 ipsec payload seen: SA
14:11:26 ipsec payload seen: KE
14:11:26 ipsec payload seen: NONCE
14:11:26 ipsec payload seen: NOTIFY
14:11:26 ipsec payload seen: NOTIFY
14:11:26 ipsec payload seen: NOTIFY
14:11:26 ipsec payload seen: VID
14:11:26 ipsec payload seen: VID
14:11:26 ipsec payload seen: VID
14:11:26 ipsec payload seen: VID
14:11:26 ipsec processing payload: SA
14:11:26 ipsec IKE Protocol: IKE
14:11:26 ipsec proposal #1
14:11:26 ipsec enc: 3des-cbc
14:11:26 ipsec prf: hmac-sha1
14:11:26 ipsec auth: sha1
14:11:26 ipsec dh: modp1024
14:11:26 ipsec proposal #2
14:11:26 ipsec enc: aes256-cbc
14:11:26 ipsec prf: hmac-sha1
14:11:26 ipsec auth: sha1
14:11:26 ipsec dh: modp1024
14:11:26 ipsec proposal #3
14:11:26 ipsec enc: 3des-cbc
14:11:26 ipsec prf: hmac-sha256
14:11:26 ipsec auth: sha256
14:11:26 ipsec dh: modp1024
14:11:26 ipsec proposal #4
14:11:26 ipsec enc: aes256-cbc
14:11:26 ipsec prf: hmac-sha256
14:11:26 ipsec auth: sha256
14:11:26 ipsec dh: modp1024
14:11:26 ipsec proposal #5
14:11:26 ipsec enc: 3des-cbc
14:11:26 ipsec prf: hmac-sha384
14:11:26 ipsec auth: sha384
14:11:26 ipsec dh: modp1024
14:11:26 ipsec proposal #6
14:11:26 ipsec enc: aes256-cbc
14:11:26 ipsec prf: hmac-sha384
14:11:26 ipsec auth: sha384
14:11:26 ipsec dh: modp1024
14:11:26 ipsec matched proposal:
14:11:26 ipsec proposal #4
14:11:26 ipsec enc: aes256-cbc
14:11:26 ipsec prf: hmac-sha256
14:11:26 ipsec auth: sha256
14:11:26 ipsec dh: modp1024
14:11:26 ipsec processing payload: KE
14:11:26 firewall,info dstnat: in:bridge out:(unknown 0), connection-state:new src-mac f0:87:56:..:..:90, proto UDP, vpn.client.public.ip:64691->mikro.tik.local.ip:500, len 652
14:11:26 ipsec ike2 respond finish: request, exchange: SA_INIT:0 vpn.client.public.ip[64691] nnnnnnnnnnnnnnnn:0000000000000000
14:11:26 ipsec processing payload: NONCE
14:11:26 ipsec adding payload: SA
14:11:26 ipsec adding payload: KE
14:11:26 ipsec adding payload: NONCE
14:11:26 ipsec adding notify: NAT_DETECTION_SOURCE_IP
14:11:26 ipsec adding notify: NAT_DETECTION_DESTINATION_IP
14:11:26 ipsec adding notify: IKEV2_FRAGMENTATION_SUPPORTED
14:11:26 ipsec adding payload: CERTREQ
14:11:26 ipsec <- ike2 reply, exchange: SA_INIT:0 vpn.client.public.ip[64691] nnnnnnnnnnnnnnnn:mmmmmmmmmmmmmmmm
14:11:26 ipsec,info new ike2 SA (R): ike2-responder mikro.tik.public.ip[500]-vpn.client.public.ip[64691] spi:mmmmmmmmmmmmmmmm:nnnnnnnnnnnnnnnn
14:11:26 ipsec processing payloads: VID
14:11:26 ipsec peer is MS Windows (ISAKMPOAKLEY 9)
14:11:26 ipsec processing payloads: NOTIFY
14:11:26 ipsec notify: IKEV2_FRAGMENTATION_SUPPORTED
14:11:26 ipsec notify: NAT_DETECTION_SOURCE_IP
14:11:26 ipsec notify: NAT_DETECTION_DESTINATION_IP
14:11:26 ipsec (NAT-T) REMOTE
14:11:26 ipsec KA list add: mikro.tik.public.ip[4500]->vpn.client.public.ip[64691]
14:11:26 ipsec fragmentation negotiated
14:11:26 ipsec -> ike2 request, exchange: AUTH:1 vpn.client.public.ip[64689] nnnnnnnnnnnnnnnn:mmmmmmmmmmmmmmmm
14:11:26 ipsec peer ports changed: 64691 -> 64689
14:11:26 ipsec KA remove: mikro.tik.public.ip[4500]->vpn.client.public.ip[64691]
14:11:26 ipsec KA list add: mikro.tik.public.ip[4500]->vpn.client.public.ip[64689]
14:11:26 ipsec payload seen: SKF
14:11:26 ipsec processing payload: ENC (not found)
14:11:26 ipsec processing payload: SKF
14:11:26 ipsec -> ike2 request, exchange: AUTH:1 vpn.client.public.ip[64689] nnnnnnnnnnnnnnnn:mmmmmmmmmmmmmmmm
14:11:26 ipsec payload seen: SKF
14:11:26 ipsec processing payload: ENC (not found)
14:11:26 ipsec processing payload: SKF
14:11:26 ipsec -> ike2 request, exchange: AUTH:1 vpn.client.public.ip[64689] nnnnnnnnnnnnnnnn:mmmmmmmmmmmmmmmm
14:11:26 ipsec payload seen: SKF
14:11:26 ipsec processing payload: ENC (not found)
14:11:26 ipsec processing payload: SKF
14:11:26 firewall,info output: in:(unknown 0) out:bridge, connection-state:established,dnat proto UDP, mikro.tik.public.ip:500->vpn.client.public.ip:64691, NAT (mikro.tik.public.ip:500->mikro.tik.local.ip:500)->vpn.client.public.ip:64691, len 337
14:11:26 ipsec payload seen: ID_I
14:11:26 ipsec payload seen: CERTREQ
14:11:26 ipsec payload seen: NOTIFY
14:11:26 ipsec payload seen: CONFIG
14:11:26 ipsec payload seen: SA
14:11:26 ipsec payload seen: TS_I
14:11:26 ipsec payload seen: TS_R
14:11:26 ipsec processing payloads: NOTIFY
14:11:26 ipsec notify: MOBIKE_SUPPORTED
14:11:26 ipsec ike auth: respond
14:11:26 ipsec processing payload: ID_I
14:11:26 ipsec ID_I (ADDR4): 192.168.179.7
14:11:26 ipsec processing payload: ID_R (not found)
14:11:26 ipsec processing payload: AUTH (not found)
14:11:26 ipsec processing payloads: NOTIFY
14:11:26 ipsec notify: MOBIKE_SUPPORTED
14:11:26 ipsec ID_R (DER DN): CN=my.domainname.com
14:11:26 ipsec adding payload: ID_R
14:11:26 ipsec adding payload: AUTH
14:11:26 ipsec Certificate:
14:11:26 ipsec serialNr:
14:11:26 ipsec issuer: <C=US, O=Let\'s Encrypt, CN=R11>
14:11:26 ipsec subject: <CN=my.domainname.com>
14:11:26 ipsec notBefore: Wed Feb 12 12:06:47 2025
14:11:26 ipsec notAfter: Tue May 13 12:06:46 2025
14:11:26 ipsec selfSigned:0
14:11:26 ipsec extensions:
14:11:26 ipsec key usage: digital-signature, key-encipherment
14:11:26 ipsec extended key usage: tls-server, tls-client
14:11:26 ipsec basic constraints: isCa: FALSE
14:11:26 ipsec subject key id:
14:11:26 ipsec authority key id:
14:11:26 ipsec subject alternative name:
14:11:26 ipsec DNS: my.domainname.com
14:11:26 ipsec signed with: SHA256+RSA
14:11:26 ipsec [RSA-PUBLIC]
14:11:26 ipsec modulus: <long hex>
14:11:26 ipsec publicExponent: 10001
14:11:26 ipsec adding payload: CERT
14:11:26 ipsec adding payload: EAP
14:11:26 ipsec <- ike2 reply, exchange: AUTH:1 vpn.client.public.ip[64689] nnnnnnnnnnnnnnnn:mmmmmmmmmmmmmmmm
14:11:26 ipsec fragmenting into 2 chunks
14:11:26 ipsec adding payload: SKF
14:11:26 ipsec adding payload: SKF
14:11:26 firewall,info output: in:(unknown 0) out:bridge, connection-state:established,dnat proto UDP, mikro.tik.public.ip:4500->vpn.client.public.ip:64689, NAT (mikro.tik.public.ip:4500->mikro.tik.local.ip:4500)->vpn.client.public.ip:64689, len 1284
14:11:26 firewall,info output: in:(unknown 0) out:bridge, connection-state:established,dnat proto UDP, mikro.tik.public.ip:4500->vpn.client.public.ip:64689, NAT (mikro.tik.public.ip:4500->mikro.tik.local.ip:4500)->vpn.client.public.ip:64689, len 868
14:11:28 firewall,info output: in:(unknown 0) out:bridge, connection-state:established,dnat proto UDP, mikro.tik.public.ip:4500->vpn.client.public.ip:64689, NAT (mikro.tik.public.ip:4500->mikro.tik.local.ip:4500)->vpn.client.public.ip:64689, len 29
14:11:48 firewall,info output: in:(unknown 0) out:bridge, connection-state:established,dnat proto UDP, mikro.tik.public.ip:4500->vpn.client.public.ip:64689, NAT (mikro.tik.public.ip:4500->mikro.tik.local.ip:4500)->vpn.client.public.ip:64689, len 29
14:11:56 ipsec child negotiation timeout in state 2
14:11:56 ipsec,info killing ike2 SA: ike2-responder mikro.tik.public.ip[4500]-vpn.client.public.ip[64689] spi:mmmmmmmmmmmmmmmm:nnnnnnnnnnnnnnnn
14:11:56 ipsec KA remove: mikro.tik.public.ip[4500]->vpn.client.public.ip[64689]
I guess it took that too litterally.......
In practical terms, one way is to use Let's Encrypt or other public authority to issue the own certificate for the responder, because then you don't need to install anything on the Windows clients - the root CA certificate is distributed using Windows Update in this case.
.....
There is no reason to import the LE certificate issued for the FQDN of the Mikrotik server to the Windows. But as you said you wouldn't take the Let's Encrypt path, I probably did not give enough details.I guess it took that too litterally.
I installed the LE certificate on the windows VPN-client via import.
Sorry for late reaction, life is intense these days.How do i get the intermediate CA (R11) on the mikrotik and how do i make it so that this stays correct when the domaincertificate is renewed?
Interestingly, the www-ssl service doesn't require such manual care - it adds the intermediate certificate to the server hello message automatically (but it still need them to be imported in advance).
The ACME agent in RouterOS requests a new certificate every 60 days, so in any case you need a script that checks ....
The ACME agent in RouterOS requests a new certificate every 60 days, so in any case you need a script that checks ....
I have no experience with scripts on the mikrotik.
Where can i find such a script, or, could you share it ?
.
/system script add name=alignLE source=":local currHTTPS [/ip service get www-ssl certificate]\
\n:local currImCA [/certificate get [find where skid=[/certificate get \$currHTTPS akid]] name]\
\n:foreach ipsecID in=[/ip ipsec identity find where peer=ike2-responder] do={\
\n :local currIPsec ([/ip ipsec identity get \$ipsecID certificate]->0)\
\n :if (\$currHTTPS != \$currIPsec) do={\
\n /ip/ipsec/identity set \$ipsecID certificate=\"\$currHTTPS,\$currImCA\"\
\n }\
\n}"
/system scheduler add disabled=yes interval=1m name=alignLE on-event=alignLE start-date=2025-01-01 start-time=00:00:00