Skip to content

FrancescoFdd5/unifi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 

Repository files navigation

Table of Contents

starts automatically when booting the UDM / UDMPro @tusc setup_wireguard.sh script and starts the Wireguard VPN tunnel. If Wireguard is not yet present on the UDM/UDMPro and the download switch is set to 1, 10-wireguard.sh automatically loads the latest release from @tusc repo and extracts it.

download = 0 disable | 1 enable ( default 0 )

On failover, Wireguard automatically switches from the primary interface to the failover interface, when switching from the failover interface to the primary interface, Wireguard remains on the failover interface.
By default, the Wireguard failover script checks every 30 seconds to see if the primary interface is available again and reconnects Wireguard to the primary interface.
In the script you can adjust the sleeptime using the variable sleeptime. Furthermore it is possible to write a logfile to the file wireguard_failover in /mnt/data/log/ using the variable logfile.

logfile = 0 disable | 1 enable ( default 0 )
sleeptime = time in seconds ( default 30 )

"Add ULA Script" adds a ULA prefix to the br0 interface.
Execute via ssh "ifconfig br0 | grep HWaddr | awk '{print $5}'" and generate a ULA PREFIX with your br0 MAC address on https://cd34.com/rfc4193/ and enter it under ULA_PREFIX_br0.

Installation

curl -LJo /mnt/data/on_boot.d/10-wireguard.sh https://raw.githubusercontent.com/k-a-s-c-h/unifi/main/on_boot.d/10-wireguard.sh
curl -LJo /mnt/data/on_boot.d/10-wireguard_failover.sh https://raw.githubusercontent.com/k-a-s-c-h/unifi/main/on_boot.d/10-wireguard_failover.sh
curl -LJo /mnt/data/on_boot.d/11-add-ula.sh https://raw.githubusercontent.com/k-a-s-c-h/unifi/main/on_boot.d/11-add-ula.sh
chmod +x /mnt/data/on_boot.d/10-wireguard*.sh
  • Adjust the settings if you want (or use default)

Author: k-a-s-c-h (@0815 on ubnt forums)

About

my Ubiquiti UniFi UDMPro script collection

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%