Skip to content

Instantly share code, notes, and snippets.

View bc-teixeira's full-sized avatar

Bruno C Teixeira bc-teixeira

View GitHub Profile
@hannesbe
hannesbe / syno-vpn-keepalive.sh
Last active September 19, 2024 10:59
Script to keep VPN alive on Synology DSM. Checks if IP is pingable and if not: disconnect VPN, reconnect VPN & add routes
# syno-vpn-keepalive.sh
# ---
# Script to keep VPN alive on Synology DSM.
# Checks if IP is pingable and if not:
# disconnect VPN, reconnect VPN & add routes
# ---
# Modify vars:
# - CHECKIP: IP to check to be pingable before reconnecting VPN
# - NAME (Synology VPN name),
# - ID (Synology VPN ID), SSH to NAS & run this to find ID