I’m trying to set up a site-to-site VPN connection between the Turris and a Fritz!Box 7490. I’ve gotten to the point that the connection seems to be established, but StrongSWAN fails to load some stuff into the kernel.
The console output is:
generating QUICK_MODE request 1206673144 [ HASH SA No KE ID ID ]
sending packet: from LOCAL_IP[500] to REMOTE_IP[500] (308 bytes)
received packet: from REMOTE_IP[500] to LOCAL_IP[500] (292 bytes)
parsed QUICK_MODE response 1206673144 [ HASH SA No KE ID ID ]
received netlink error: No such file or directory (2)
unable to add SAD entry with SPI cf94fd61
received netlink error: No such file or directory (2)
unable to add SAD entry with SPI 939a5d3b
unable to install inbound and outbound IPsec SA (SAD) in kernel
generating INFORMATIONAL_V1 request 1179177243 [ HASH N(NO_PROP) ]
sending packet: from LOCAL_IP[500] to REMOTE_IP[500] (76 bytes)
establishing connection 'FRITZBOX' failed
Second guess: xfrm modules not loaded. These get loaded on boot normally. Packages are kmod-ipsec4 for IPv4 and kmod-ipsec6 for IPv6. These packages automatically install the crypto packages through dependencies.
I checked my kernel modules and all of the modules on this list are loaded, except “deflate” and “xfrm_user”. I could not find those two modules in any package.
Originally, I installed the meta package “strongswan-full” and it seems that all of these modules are installed along with this.
How can I figure out what StrongSWAN is trying to do, that causes the error message “No such file or directory”?
I did not see anything useful in /var/log/messages…
During my testings connection Caos Calmer strongswan i needed this in the connection settings:
leftfirewall=yes
lefthostaccess=yes
and this additional firewall rule
iptables -t nat -A postrouting_rule -m policy --dir out --pol ipsec --proto esp -j ACCEPT
I never got traffic shaping working with strongswan. Used sqm qos and not wondershaper and it always applied the ipsec packaes twice for bandwidth management so the max ipsec bandwidth was always half of the defined max bandwidth.
Yep, I have these packages installed too, but they only contain the scripts to load the modules but not the modules themselves:
root@turris:~# opkg files kmod-crypto-iv
Package kmod-crypto-iv (4.4.13+7-1-05df79f63527051ea0071350f86faf76-7) is installed on root and has the following files:
/etc/modules.d/10-crypto-iv
root@turris:~# cat /etc/modules.d/10-crypto-iv
eseqiv
chainiv
So I guess the packages are broken…
Do you know where to file bug reports? I did not find a bug tracker around here…
opkg files kmod-crypto-iv
Package kmod-crypto-iv (3.18.23-1) is installed on root and has the following files:
/etc/modules.d/10-crypto-iv
/lib/modules/3.18.23/chainiv.ko
/lib/modules/3.18.23/eseqiv.ko
opkg files kmod-crypto-rng
Package kmod-crypto-rng (3.18.23-1) is installed on root and has the following files:
/lib/modules/3.18.23/rng.ko
/etc/modules.d/09-crypto-rng
/lib/modules/3.18.23/krng.ko
Can be those modules are builtin. I grabbed the git tree and if I add the strongswan packges iv and rng packages are marked as buildtin and not separate kernel modules.
Tried my caos calmer config on the turris router and also received your error messages.
Found that thread https://lists.strongswan.org/pipermail/users/2013-August/005104.html
So i installed strongswan-mod-kernel-libipsec and now i can ping the remote subnet from the turris router.
I’m using ike2 and x509 certs so my config is different.
Never mind, I wound have run into that problem in a few days anyway.
With that libipsec module the ipsec0 interface is back, hope it works like openswan again, which was much easier configurable in regards to routing.
With these settings it works from the turris router to the other router and the other subnet and from the other router to the turris router. everything else (othersubnet to turris and local subnet and other router to local subnet) gives me Destination Port unreacheble atm. Gotta setup an proper test environment tomorrow.
Also libipsec does not seem to be as performant as the kernel implementation. https://wiki.strongswan.org/projects/strongswan/wiki/Kernel-libipsec