Switched from ngrok to autossh
parent
4cc805e565
commit
f30877ac6d
@ -0,0 +1,10 @@
|
|||||||
|
Host bpfilip.dk
|
||||||
|
HostName bpfilip.dk
|
||||||
|
IdentityFile /root/.ssh/id_rsa
|
||||||
|
User root
|
||||||
|
Port 2223
|
||||||
|
LocalForward 22 127.0.0.1:2222
|
||||||
|
RemoteForward 2222 127.0.0.1:22
|
||||||
|
RemoteForward 10.0.1.25:8080 127.0.0.1:8080
|
||||||
|
GatewayPorts yes
|
||||||
|
Compression yes
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Keeps an SSH tunnel to 'bpfilip.dk' open
|
||||||
|
After=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=root
|
||||||
|
ExecStart=/usr/bin/autossh -M 0 -N -q -o "ServerAliveInterval 60" -o "ServerAliveCountMax 3" bpfilip.dk
|
||||||
|
ExecStop=/usr/bin/killall -s KILL autossh
|
||||||
|
Restart=always
|
||||||
|
RestartSec=3
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@ -1,16 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=Start ngrok tunnel on startup
|
|
||||||
After=network-online.target
|
|
||||||
Wants=network-online.target systemd-networkd-wait-online.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=/usr/local/bin/ngrok start --all --config /home/pi/video-player/ngrok.yml
|
|
||||||
ExecReload=/bin/kill -HUP $MAINPID
|
|
||||||
KillMode=process
|
|
||||||
IgnoreSIGPIPE=true
|
|
||||||
Restart=always
|
|
||||||
RestartSec=3
|
|
||||||
Type=simple
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
Loading…
Reference in New Issue