'Why doesn't systemd start my autossh tunnel on reboot?

I have a PC that I need to ssh into which only has a private IP (running Ubuntu 20.04 LTS). This is my first time working with autossh and systemd. I have autossh working and I can easily create a tunnel and ssh into the PC from my server (which has a public ip).

I have noticed that the ssh tunnel will randomly close despite having ServerAliveInterval 30 and ServerAliveCountMax 3 values. I have been fixing this my manually deleting the tunnel on both the PC and server, and then creating it all over again. But this is a temporary solution since ideally I would want the tunnel to come back by itself. I believe the tunnel closes to either the network dropping and coming back up, but I am not sure why. Here is the systemd service I created on the PC:

tunnel-up.service (192.168.1.111 is the fake public IP of the server)

[Unit]
Wants=network-online.target
After=network-online.target

[Service]
Type=oneshot
ExecStart=autossh -M 0 -o  "ExitOnForwardFailure=yes" -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -NT -o Tunnel=point-to-point -w 1:1 192.168.1.111 &
ExecStart=/bin/bash /root/scripts/link-up.sh

[Install]
WantedBy=multi-user.target

link-up.sh

#!/bin/bash
ip link set tun1 up && ip addr add 10.250.0.3/30 peer 10.250.0.4 dev tun1

I have done systemctl daemon-reload and systemctl start tunnel-up.service but when I reboot my computer the tunnel never gets created... I had the autossh command inside my link-up.sh script and when I executed the script it worked perfectly, however when it comes to running this on startup it never works. Any help would be appreciated.

Here is the output of journalctl -u tunnel-up.service

May 06 17:42:18 hmtest.ut systemd[1]: Starting tunnel-up.service...
May 06 17:42:18 hmtest.ut autossh[1067]: port set to 0, monitoring disabled
May 06 17:42:18 hmtest.ut autossh[1067]: starting ssh (count 1)
May 06 17:42:18 hmtest.ut autossh[1067]: ssh child pid is 1077
May 06 17:42:18 hmtest.ut autossh[1077]: ssh: connect to host 192.168.1.111 port 22: Network is unreachable
May 06 17:42:18 hmtest.ut autossh[1067]: ssh exited prematurely with status 255; autossh exiting
May 06 17:42:18 hmtest.ut systemd[1]: tunnel-up.service: Main process exited, code=exited, status=1/FAILURE
May 06 17:42:18 hmtest.ut systemd[1]: tunnel-up.service: Failed with result 'exit-code'.
May 06 17:42:18 hmtest.ut systemd[1]: Failed to start tunnel-up.service.


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source