I have one setup where I have two sites, both with a small OpenWrt gateway, connected to each other using Strongswan. It works 99 % perfect. There's something amiss in how and why the sites initiate connection, but it does everything I want it to do.
Now I'd like to connect a roaming OpenWrt gateway to one of these. My problem is that the roaming 3g gateway is behind a carrier-grade NAT and IPv4 only. Because Strongswan relies on UDP, it does not work.
I have tried to set up Wireguard, but I can't make it appear in the list of protocols when I attempt to create a new interface. I am also not sure whether it allows me to route between two subnets.
My second choice is sshtunnel. I have the packages installed and am currently trying to configure it. Problem is, I am not sure if it can do what I want it to do. That is, route selectively between two subnets. I just wanted to set up a client, so I did not use a server section in the config file. Then I realized that the server section refers to what I am connecting to, and the tunnel is about what kind of connection I will make.
The instructions here I find quite confusing. It does not mention tunnelW at all. And neither do I see whether I need tunnelL or tunnelR sections with the tunnelW section. I probably do not.
Also, I get
debug1: sys_tun_open: failed to open tunnel control interface: No such file or directory when attempting the same thing manually, but the entire Internet is seemingly unaware of what is a tunnel control interface and how do I set up such a thing. I have enabled tunneling in
sshd_config, I am root, I have the
tun module loaded. (In remote, yes, but not locally. Solved it by installing
kmod-tun. Then the next problem.)
I have this in the
/etc/config/network on both ends:
config interface 'vpn0' option ifname 'tun0' option proto 'none'
On the "server" I get this. These happen within one second:
daemon.notice netifd: Interface 'vpn0' is enabled daemon.notice netifd: Network device 'tun0' link is up daemon.notice netifd: Interface 'vpn0' has link connectivity daemon.notice netifd: Interface 'vpn0' is setting up now daemon.notice netifd: Interface 'vpn0' is now up daemon.info : 06[KNL] interface tun0 deactivated daemon.info : 12[KNL] fe80::19a:267:b731:f800 disappeared from tun0 daemon.notice netifd: Network device 'tun0' link is down daemon.notice netifd: Interface 'vpn0' has link connectivity loss daemon.notice netifd: Interface 'vpn0' is now down daemon.info : 10[KNL] interface tun0 deleted
I could or would try sshuttle also, but I haven't been able to figure out what it is and what it is supposed to do. The documentation just tells me what I could possibly be unable or dislike to do to possibly want to use it.