I'm trying to simplify some of my configs for sles15, pushing out tunnel configs to my machines via ansible. Currently whenever I configure a tunnel, I do it on the fly using ssh from the machine initiating the ssh tunnel and sudo commands (running tunctl (which isn't there any more).
What I'd like to do is have the tunnel persistent on the sles15 machine and then just connect to it with ssh and the -w command.
However, this doesn't work worth a crap:
<interface> <link-type>tun</link-type> <name>tun1</name> <control> <mode>boot</mode> </control> <firewall/> <tun> <owner>ansible</owner> <group>sshinternalusers</group> </tun> <ipv4> <enabled>true</enabled> <forwarding>true</forwarding> </ipv4> <ipv6> <enabled>false</enabled> <forwarding>false</forwarding> </ipv6> </interface>
and this doesn't work either (which I think is the traditional way of doing it)
STARTMODE='onboot' BOOTPROTO='static' TUNNEL_SET_PERSISTENT='yes' TUNNEL='tun' TUNNEL_LOCAL_IPADDR=172.20.26.115 TUNNEL_REMOTE_IPADDR=172.20.26.114 TUNNEL_DEVICE=tun0 TUNNEL_SET_OWNER=ansible TUNNEL_SET_GROUP=sshinternalusers
I haven't found any documentation on the XML (other than reverse engineering the schema). The tunnel does appear to start when I reboot the machine, but there has to be a different way to get the tunnel up because when I run ifup tun0 it tells me "no device"