Closed 0x-2a closed 2 years ago
@y3sh Hello! Thank you for the detailed issue description. The error you mentioned, authentication failed: no acceptable ECDSA/RSA-PSS ASN.1 signature hash proposal included for rsasig
, can be fixed using authby=rsa-sha1
. This option should be added on your VPN server, not on the client.
Edit /etc/ipsec.d/ikev2.conf
on your VPN server. Append authby=rsa-sha1
to the end of conn ikev2-cp
section, indented by two spaces. Save the file and run sudo service ipsec restart
.
Let us know if this fixes the issue.
@COI-03 I just use the diff
keyword after three back-ticks
```diff
- minus is red
+ is green
Thanks @hwdsl2
It seems to be connected now, with ipsec status
showing vpnclient[1]: ESTABLISHED 20 minutes ago ...
. However, on the server it throws the error:
"ikev2-cp"[18] x.x.x.x #30: established IKE SA; authenticated using RSA with SHA1 and peer certificate 'CN=vpnclient, O=IKEv2 VPN' issued by CA 'CN=IKEv2 VPN CA, O=IKEv2 VPN'
"ikev2-cp"[18] x.x.x.x #31: proposal 1:ESP=AES_GCM_C_128-DISABLED SPI=c4360aab chosen from remote proposals 1:ESP:ENCR=AES_GCM_C_128;ESN=DISABLED[first-match] 2:ESP:ENCR=AES_CBC_128;ENCR=AES_CBC_192;ENCR=AES_CBC_256;INTEG=HMAC_SHA2_256_128;INTEG=HMAC_SHA2_384_192;INTEG=HMAC_SHA2_512_256;INTEG=HMAC_SHA1_96;INTEG=AES_XCBC_96;ESN=DISABLED
"ikev2-cp"[18] x.x.x.x #31: established Child SA using #30; IPsec tunnel [0.0.0.0-255.255.255.255:0-65535 0] -> [192.168.43.10-192.168.43.10:0-65535 0] {ESPinUDP=>0xc4360aab <0x210769d5 xfrm=AES_GCM_16_128-NONE NATD=x.x.x.x:4500 DPD=active}
"ikev2-cp"[18] x.x.x.x #31: ESP traffic information: in=0B out=0B
"ikev2-cp"[18] x.x.x.x: kernel: xfrm XFRM_MSG_DELPOLICY for flow %discard(discard)(in) encountered unexpected policy
--ERROR: "ikev2-cp"[18] x.x.x.x #31: kernel: xfrm XFRM_MSG_DELPOLICYdelete(UNUSED) response for flow (in): No such file or directory (errno 2)
While this appears to be connected, I'm unable to route traffic through the tunnel. I'm not sure what the cause is yet -- likely I misconfigured a NAT or firewall policy. If there's something else obvious here I could try it, otherwise we can probably close the ticket as there is more investigation to do on my end.
@y3sh Thanks for the update. The error you highlighted, kernel: xfrm XFRM_MSG_DELPOLICYdelete(UNUSED) response for flow (in): No such file or directory (errno 2)
, is a known issue with Libreswan 4.6. It generally should not affect the functionality of the VPN, and is to be fixed in the upcoming Libreswan version. For the other issue you mentioned, "unable to route traffic through the tunnel", it could be your firewall policy or IPTables issues on the VPN server (less likely). Please investigate further yourself.
@hwdsl2 I was able to get the error resolved by changing left=%any
to have my WAN IP instead of %any
. Because the "NO Child SA" error exits with code 1, the leftupdown
script in ipsec.conf
never gets run, preventing the final ip tunnel config connecting ethernet to the vti.
A couple new issues remain though, am only able to receive and rather slowly. Both I feel are still probably out of scope of this repo though.
Update: was able to get it partially working to authenticate and receive only (under 15mbps). Still a work in progress.
I'm nearly able to authenticate ikev2 StrongSwan client (Linux strongSwan U5.6.3/K4.9.79-UBNT) from EdgeOS on Ubiquiti routers, which I believe is a Debian Linux variant similar to Vyatta/VyOS. Having read much of the docs and many issues here, I have nearly achieved connectivity but am stumped by issues similar to https://github.com/hwdsl2/setup-ipsec-vpn/issues/930. Though the solution there doesn't work here (authby=sha1
).My goal is to make a wiki doc with how to achieve an all-traffic vpn from these routers. Given the growing popularity of Ubiquiti routers along with many unresolved forum discussions on community.ui.com, reddit.com, serverfault.com, and others trying to figure out similar vpn client configs with little success. Hopefully this post can also be a reference point for others. Below is my current work in progress doc . This is between the EdgeOS v2.0.9 router (Ubiquiti ER-4) and an AWS instance running Amazon Linux 2 AMI.
EdgeOS -> VPN Server Tunnel (IKEv2) Setup Steps
Assumptions (change these for yourself if you follow this guide)
99.99.99.99
22.22.22.22
192.168.1.1
192.168.1.0/24
192.168.43.11
eth0
WAN to interneteth1
lan (not bridged)ec2-user@99.99.99.99
Now copy the keys to local machine
And copy the certs to the router
Now ssh into the router via
ssh admin@192.168.1.1
Make a new file at
/config/ipsec-updown.sh
and add the following. Use vimvi
or whatever text editor you like that's on the os.Make the above file executable.
Later should see the echos above in
Make a new file
/config/ipsec.conf
and add the following. I'll make an attempt at trying to explain what I think these options mean.In the router's
/config/ipsec.secrets
put the following.vpnclient
references theleftid
above.Alter the EdgeOS vpn, firewall, interfaces, and services to direct all traffic to the vpn.
Get ready to connect. Out on the AWS server, start watching logs in a different ssh session to debug.
Update ipsec, run, and test the connection
Where I'm currently stuck (most recent update)
I've got the tunnel working with the above for just receiving only. And it is rather slow (max 15mbps).
Feel free to contribute, otherwise I'll leave this here for others to work off of.
Stuck on no acceptable edsa rsa(update, got this part working)With all the above, the resulting error is no acceptable signature hash.
I have tried setting
authby=sha1
, however that flag seems invalid (from https://github.com/hwdsl2/setup-ipsec-vpn/issues/930)I have tried opening up
ike
andesp
to more ciphers, however no change (from https://github.com/hwdsl2/setup-ipsec-vpn/issues/1122)....
Where to from here?
Resources
Docs
https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/clients.md#debian-1110-kernel
https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/ikev2-howto.md#android
https://github.com/hwdsl2/setup-ipsec-vpn/blob/master/docs/ikev2-howto.md#routeros
Related Issues
https://github.com/hwdsl2/setup-ipsec-vpn/issues/1060
https://github.com/hwdsl2/setup-ipsec-vpn/issues/1122
https://github.com/hwdsl2/setup-ipsec-vpn/issues/1077
https://github.com/hwdsl2/setup-ipsec-vpn/issues/930
External
ProtonVPN IKEv2 client config https://community.ui.com/questions/ProtonVPN-IKEv2-client-configuration-for-EdgeRouter/c2b64fa4-9eac-4aa4-b854-9ec9949a7e11
Debian strongswan tunneling https://blog.sys4.de/routing-based-vpn-with-strongswan-de.html
EdgeOS with AlgoVPN (doesn't work anymore) https://github.com/kiratp/algo/blob/master/docs/client-edgemax.md
Ubiquiti forums ikev2 for nordvpn (with 11k views) https://community.ui.com/questions/IPSec-to-NordVPN-IKEv2-EAP-MSCHAPv2/9b2615c4-960b-4563-afa2-aeeefee3fd48#answer/900f60de-fcad-45d5-a9e4-ccac764332a9
Ubiquiti site-to-site VTI over IKEv2 https://help.ui.com/hc/en-us/articles/115012305347-EdgeRouter-Route-Based-Site-to-Site-VPN-to-Azure-VTI-over-IKEv2-IPsec-
MARC Strong Swang boards https://marc.info/?l=strongswan-users&m=147066200415239&w=2
Reddit ramblings, unhelpful mixed bag
https://www.reddit.com/r/Ubiquiti/comments/acsex2/ikev2ipsec_vpn_on_edgerouter/
https://www.reddit.com/r/Ubiquiti/comments/somr5s/edgerouter_ike2ipsec_nordvpn_client/
https://www.reddit.com/r/Ubiquiti/comments/93pgj1/edgerouter_x_setting_up_vpn/
https://www.reddit.com/r/meraki/comments/9kzyqu/use_ubiquiti_edgerouter_x_to_get_ikev2/
https://www.reddit.com/r/Ubiquiti/comments/cui1wj/edgerouter_4_mdnsrepeater_ipsec_sitetosite_vpn/