Short bash script that sets up a vpn-like connection using the SSH -w tunnel option. Works only with IPv4 and point-to-point (layer-3) tunnels. Also sets up routes correctly even with ProxyJumps.
Requires ip and sysctl on the client; ip, iptables, sysctl on the remote.
The script is meant to be run as root, and also it needs to be able to run the previous commands on the remote so probably also root there. I haven't done a lot of testing and it might be buggy but it works on my machine ™️.