Community discussions

 
User avatar
BlackVS
Member Candidate
Member Candidate
Topic Author
Posts: 171
Joined: Mon Feb 04, 2013 7:00 pm
Contact:

VPN channels switcher (one more fail-over script)

Tue Feb 13, 2018 12:57 pm

Hi All,
here is one more example of channels switching (fail-over), Multi-VPN switcher, see attach.
Can be useful for scripting funs. And may be also for switching VPN channels %)
https://www.mikrotik-club.in.ua/2018/02 ... -failover/ (in Russian)

1. Import and set/tune parameters in vpn-tunnel-check and vpn-interfaces scripts:

vpn-tunnel-check :

gw - what to ping
cnt2ping - how much too ping
minlevel - minimum allowed successful ping to count channel alive 

vpn-interfaces

imask - mask for switched channels. For example "^VPN*" means channels, starting from "VPN" in their name.
delayBeforeChecks - delay between enabling of channel and starting it's health check.

checkIfRunning - will we check "running" status. Makes sense for pptp/l2tp.
runningDelay - delays between "running" checks
runningMaxCount - how long we will wait for "running"=true

checkIfPing - will we check health of channel by pinging.
checkPing2Interface - will we specify interface during ping. I.e. will we ping via concrete interface.
ping2host - host to be pinged
pingMaxCount - how much to ping
pingMinCount - minimal successful pings to count channel alive

2. Check scripts vpn-tunnel-check and vpn-interfaces by running them from terminal.

3. Enable vpn-check-task scheduler task.
You do not have the required permissions to view the files attached to this post.

Who is online

Users browsing this forum: No registered users and 10 guests