First a bit of background: I am trying to create a VPN over ssh (-w).
I am successful using ifconfig, and now I am trying to automate things a bit.
This is under /etc/systemd/network/vpn.netdev:
Code: Select all
[NetDev]
Name=tun5
Kind=tun
[Tun]
Code: Select all
# ifconfig tun5 192.168.244.5 pointopoint 192.168.244.7 netmask 255.255.255.0
# ifconfig
tun5: flags=4241<UP,POINTOPOINT,NOARP,MULTICAST> mtu 1500
inet 192.168.244.5 netmask 255.255.255.0 destination 192.168.244.7
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Code: Select all
[Match]
Name=tun5
[Network]
Description=Incoming connections from my network
Address=192.168.244.5/24
IPForward=ipv4
[Address]
Address=192.168.244.5/24
Peer=192.168.244.7/24
Code: Select all
tun5: flags=4241<UP,POINTOPOINT,NOARP,MULTICAST> mtu 1500
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0