Hi there, I had strongswan working without a separate interface. Since I had issues with interface switches (lan0 to wlan0 and vice versa) I now configured “route based vpn”. The steps I did:
create interface vpn0:
ip link add vpn0 type xfrm if_id 42
bring the interface up:
ip link set vpn0 up
in /etc/swanctl/swanctl.cfg I added :
if_id_in = 42
if_id_out = 42
The tunnel works. I can ping my companies servers ( 10.x.x.x and 192.x.x.x nets)
But I dont get the DNS to work properly.
resolvectl shows that the dns servers have been added/linked to my vpn0 interface:
Link 6 (vpn0)
Current Scopes: none
Protocols: -DefaultRoute -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
DNS Servers: 10.x.x.1 10.x.x.2 10.x.x.3
The only thing that bothers me is the output of “ip a” which shows the working vpn0 interface as “state UNKNOWN”.
#: ip a
6: vpn0@NONE: <NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
link/none
inet6 fe80::9e19:93da:bff7:4fa/64 scope link stable-privacy
valid_lft forever preferred_lft forever
I used wireshark to verify that my traffic actually is being routed over vpn0.
In /etc/strongswan.d/resolv.conf I set the vpn0 iface (iface = vpn0).
What am I doing wrong?
Thanks for any input on this