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!

OpenVPN Client / Notification when loosing public IP

Discussion in 'Asuswrt-Merlin' started by Emanuel Paul, Feb 8, 2018.

Thread Status:
Not open for further replies.
  1. Martineau

    Martineau Very Senior Member

    Joined:
    Jul 8, 2012
    Messages:
    1,560
    Location:
    UK
    Did you check Syslog for messages? :rolleyes::rolleyes:....that's what the script was designed to do i.e. log information so you can later examine the Syslog and identify if/when the loss of the Public VPN IP occurs if you don't receive the expected email(s).
    Code:
    grep ChkVPNIP /tmp/syslog.log
    Really? Can see/understand what is missing now??:rolleyes:

    PEBCAK
     
    Last edited: Feb 14, 2018
  2. Please support SNBForums! Just click on this link before you buy something from Amazon and we'll get a small commission on anything you buy. Thanks!
  3. Emanuel Paul

    Emanuel Paul Occasional Visitor

    Joined:
    Dec 15, 2017
    Messages:
    35
    Sorry, but no. Absolutely no clue, what you want me to see with your last post. If I do "grep ChkVPNIP /tmp/syslog.log" the result is:

    ASUSWRT-Merlin RT-AC86U 382.1-2 Sat Dec 2 05:50:24 UTC 2017
    [email protected]:/tmp/home/root# grep ChkVPNIP /tmp/syslog.log
    Feb 14 06:45:44 (ChkVPNIP.sh): 21064 v1.01b VPN Public WAN IP checker.....
    Feb 14 06:45:51 (ChkVPNIP.sh): 21064 VPN Client 2 lost it's public WAN IP address
    Feb 14 06:46:23 (ChkVPNIP.sh): 21255 v1.01b VPN Public WAN IP checker.....
    Feb 14 06:46:30 (ChkVPNIP.sh): 21255 VPN Client 1 lost it's public WAN IP address


    That's nice to know, but what should that help? I don't know why the public IP's get lost and I don't get an email if so. But that is the purpose of the scripts, or not?

    But checking the log leads to other questions...Why it shows a completely wrong time and date. The router itself shows the correct time/date.
     
  4. Martineau

    Martineau Very Senior Member

    Joined:
    Jul 8, 2012
    Messages:
    1,560
    Location:
    UK
    What happens if you run the script like this?
    Code:
    ./ChkVPNIP.sh
    
    grep ChkVPNIP /tmp/syslog.log
    If you mean this:
    Code:
    ASUSWRT-Merlin RT-AC86U 382.1-2 Sat Dec 2 05:50:24 UTC 2017
    This is the timestamp indicating when RMerlin built the firmware.

    Does the cron job appear when you issue:

    cru l


    Have you enabled

    upload_2018-2-14_7-59-53.png
     
    Last edited: Feb 14, 2018
  5. Emanuel Paul

    Emanuel Paul Occasional Visitor

    Joined:
    Dec 15, 2017
    Messages:
    35
    Then I get the following (Just used ./ChkVPNIP.sh):

    Is it necessary to add the client to the script? But in the log both are noted...


    Than this is showed:



    Yes.
     
    Last edited: Feb 14, 2018
  6. Martineau

    Martineau Very Senior Member

    Joined:
    Jul 8, 2012
    Messages:
    1,560
    Location:
    UK
    <sigh>

    So clearly English is not your first language, but as you can see from the above 'cru' recognises one of 3 possible single alphabetic characters as the second parameter.

    So the digit '1' is invalid but 'l' (short for 'list') is.
     
  7. Emanuel Paul

    Emanuel Paul Occasional Visitor

    Joined:
    Dec 15, 2017
    Messages:
    35
    If I use cru l nothing happens.
     
  8. Martineau

    Martineau Very Senior Member

    Joined:
    Jul 8, 2012
    Messages:
    1,560
    Location:
    UK
    So we are back to your post #20 and post #19 where somehow you did manage to type 'cru l' correctly.

    Did you create script '/jffs/scripts/init-start' ?

    What happens if you issue
    Code:
    cd /jffs/scripts
    
    cat /jffs/scripts/init-start
    
    ./init-start
    
    cru l
     
    Last edited: Feb 14, 2018
  9. Emanuel Paul

    Emanuel Paul Occasional Visitor

    Joined:
    Dec 15, 2017
    Messages:
    35
    No. I did never use that code, because I don't now what for I should use it.

    As written, I created the file cronjobs.sh in that directory. But you ask if I created the script '/jffs/scripts/init-start'. I thought, the scripts are cronjobs.sh and CheckVPNIP.sh.

    If I issue the codes I get the following:

    Sounds for me, like init-start should not be a directory?
     
    Last edited: Feb 14, 2018
  10. Martineau

    Martineau Very Senior Member

    Joined:
    Jul 8, 2012
    Messages:
    1,560
    Location:
    UK
    Ha Ha ha ha o_Oo_Oo_Oo_Oo_O.......you don't think Sherlock?

    P.S. Do you have any idea who created the '/nat-start' directory?

    So we are back to your post #20

    upload_2018-2-15_11-46-12.png
    Clearly you deliberately lied or had a senior moment?

    Why give you I Wiki link in post #16. Look up you init-start in the Wiki....hey let me do that for you...
    What is init-start used for

    One last time....have you created the script '/jffs/scripts/init-start? - like you said you did in post #20

    Good luck troll
     
    Last edited: Feb 16, 2018
  11. thiggins

    thiggins Mr. Easy Staff Member

    Joined:
    May 18, 2008
    Messages:
    13,226
    Locking thread.
     
    Emanuel Paul likes this.
Thread Status:
Not open for further replies.
Please support SNBForums! Just click on this link before you buy something from Amazon and we'll get a small commission on anything you buy. Thanks!