![]() ![]() Thanks to foobar666, you no longer need to enter VPNID or VPNNAME, it will detect them automatically. LogFile = "/volume1/video/Backup/airvpn/check_airvpn_$DATE.log" (3) Edit script variables so it works for your system. You can do that on windows with Notepad++, just open file with Notepad++, click "Encoding" - "Convert to UTF-8 without BOM" and them save file. Make sure to save it in UNIX UTF8, not windows. (2) Save script above in file "synovpn_reconnect". As admin go to "Control panel" - "Terminal & SNMP" (you need to enable advanced mode in top right corner of control panel for this) (1) Enable SSH on your Synology if you didn't already. UPTIME=$(date -d"$UPTIME" +"%Y/%m/%d %H:%M:%S")Įcho "VPN is up since: $UPTIME" > $LogFileĮcho "Session Data RX: $RXDATA" > $LogFileĮcho "Session Data TX: $TXDATA" > $LogFile IPADDR=$(/sbin/ifconfig tun0 | grep 'inet addr' | cut -d: -f2 | awk '' | tail -1) usr/syno/bin/synovpnc reconnect -protocol=openvpn -name=$VPNNAME > $LogFileĮcho "=" > $LogFile bin/kill `cat /var/run/ovpn_client.pid` 2>/dev/nullĮcho 1 > /usr/syno/etc/synovpnclient/vpnc_connectingĮcho conf_id=$VPNID > /usr/syno/etc/synovpnclient/vpnc_connectingĮcho conf_name=$VPNNAME > /usr/syno/etc/synovpnclient/vpnc_connectingĮcho proto=openvpn > /usr/syno/etc/synovpnclient/vpnc_connecting # /usr/syno/bin/synovpnc kill_client -protocol=openvpn -name=$VPNNAME ovpn file" and change OpenVPN version to "> $LogFile (4) Under "Advanced - OpenVPN only" section (right part of page), select "Separate keys/certs from. You can choose any combination of protocol/port, but then also change iptables accordingly if you are using failsafe script. (3) Under "Protocols" section select one with protocol UDP and port 443 (at the time of writing, it was first in list). ![]() (1) SELECT the Advanced Mode (near top right of the page) Go to the page to generate the configuration file. I'm doing this mostly because I usually forget things I managed to solve after year or two, so this is way to have constant reminder how it was solved and also help others. Setting up VPN on Synology is modified neolefort tutorial from here and reconnect script if from sundi which you can find here, which probably modified this script, plus my iptables for blocking Synology on router level when VPN fails.įoobar666 - you no longer need to enter variables manually This is collection from different tutorials which I will refer here, but usually changed since some things changed. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |