1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

VPN servers destinations in a scheduled config

Discussion in 'ASUS Wireless' started by San, Dec 10, 2019.

  1. San

    San New Around Here

    Joined:
    Feb 15, 2015
    Messages:
    6
    Location:
    St Louis MO USA
    I have a little situation where my ISP start throttling and messing with the DL bandwidth even with VPN UP so I need to change destinations every 2 to 4 days.

    so wondering if any of you has an idea how to setup a schedule where I can define 3 to 5 different destinations using the same client config and switch between them every 3 o 4 days.

    any help really appreciated I have been using Merlinf software for wuite some time I do have AC87, AC3100 adn AC3200
     
  2. biggzsizzle

    biggzsizzle Occasional Visitor

    Joined:
    Dec 10, 2019
    Messages:
    12
    *Bumping for the knowledge... ;)
     
  3. royarcher

    royarcher Senior Member

    Joined:
    Apr 25, 2019
    Messages:
    389
    Location:
    from where women glow and men chunder
    Swap ISP,s
     
    TNCS likes this.
  4. Martineau

    Martineau Part of the Furniture

    Joined:
    Jul 8, 2012
    Messages:
    2,557
    Location:
    UK
    You can include several 'connection profiles' in the VPN Client GUI (if you set 'Log verbosity=4' in the GUI you can see them displayed in Syslog)

    e.g. specify a list of remote VPN server/port entries, that will be randomly chosen:
    Code:
    remote-random
    
    remote xxx.xxx.xxx.xxx nnn
    remote xxx.xxx.xxx.xxx nnn
    etc.
    and simply schedule cron to issue
    Code:
    service restart_vpnclientX
    where 'X' is the appropriate VPN Client.

    Alternatively you could try VPN Failover Monitor
     
  5. biggzsizzle

    biggzsizzle Occasional Visitor

    Joined:
    Dec 10, 2019
    Messages:
    12
    I like this idea, but my main concern is about speed,... I guess I'll just have to take the time and try each .ovpn file I have until I find the servers that are the fastest (perhaps closest) to me.

    I really wish NordVPN would provide a list of servers by State here in the US...
    All I have to go on are the .ovpn files they provide that begin with "us" ...

    Thank you so much!
     
  6. Martineau

    Martineau Part of the Furniture

    Joined:
    Jul 8, 2012
    Messages:
    2,557
    Location:
    UK
    That is why (if you are using RMerlin's firmware) I suggested the VPN Failover Monitor script, so that it would try to ensure the current connected VPN server meets your minimum throughput/performance criteria, and would automatically switch to the next server in the defined VPN_Failover list if the speed is unacceptable.
     
    biggzsizzle likes this.
  7. TNCS

    TNCS Occasional Visitor

    Joined:
    Aug 16, 2019
    Messages:
    39
    Totally agree, I can get why some ISP want to shape/limit usage for abuse, but purposefully throttling VPN is just being to cheap. With the extra expense on VPN, surely you have some option for a better ISP?
     
  8. biggzsizzle

    biggzsizzle Occasional Visitor

    Joined:
    Dec 10, 2019
    Messages:
    12
    So I'm assuming the script installed,...but,... what am I missing here? ie. "not found" ??

    [​IMG]
     
  9. Martineau

    Martineau Part of the Furniture

    Joined:
    Jul 8, 2012
    Messages:
    2,557
    Location:
    UK
    As there is no alias for 'VPN_Failover.sh' if you are in directory '/jffs/scripts/' then use
    Code:
    ./VPN_Failover.sh
    otherwise use the full pathname
    Code:
    /jffs/scripts/VPN_Failover.sh
    '
     
    biggzsizzle likes this.
  10. biggzsizzle

    biggzsizzle Occasional Visitor

    Joined:
    Dec 10, 2019
    Messages:
    12
    Is there a quick command to stop the script in its tracks?

    And thank you so much for your help!!
     
    lukaszzsch likes this.
  11. lukaszzsch

    lukaszzsch Regular Contributor

    Joined:
    Aug 7, 2016
    Messages:
    90
  12. Martineau

    Martineau Part of the Furniture

    Joined:
    Jul 8, 2012
    Messages:
    2,557
    Location:
    UK
    If you are not using the recommended 'openvpn-event' scripts, then for a graceful termination
    Code:
    rm /tmp/vpnclientX-VPNFailover"
    where "X" is the VPN ID e.g. 1, 2 etc.
    or
    in an emergency (i.e. leaves behind orphaned ' /tmp/vpnclientX-VPNFailover' file)
    Code:
    kill -9 $(pidof VPN_Failover.sh)
     
    Last edited: Dec 26, 2019
    biggzsizzle and L&LD like this.
  13. biggzsizzle

    biggzsizzle Occasional Visitor

    Joined:
    Dec 10, 2019
    Messages:
    12
    What can be done with said orphan?? Can you rm it after you've had to kill it??
     
  14. Martineau

    Martineau Part of the Furniture

    Joined:
    Jul 8, 2012
    Messages:
    2,557
    Location:
    UK
    You can run the 'status' command
    Code:
    ./VPN_Failover.sh   status
    then issue the 'reset' command
    Code:
    ./VPN_Failover.sh   reset   X
    where 'X' is the VPN ID i.e. 1,2 etc.
     
    biggzsizzle likes this.
  15. biggzsizzle

    biggzsizzle Occasional Visitor

    Joined:
    Dec 10, 2019
    Messages:
    12
    I'm talking about the '' /tmp/vpnclientX-VPNFailover' file'... if I have to terminate the script and then this orphan is made, what do I need to do with the orphan??