What's new

OpenVPN Client / Notification when loosing public IP

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Status
Not open for further replies.
.I tested the scripts the last days. Something does not work.

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

The script itself works and sends email when I manually start it with ./ChkVPNIP.sh 2.

But it seems that this does not start the ChkVPNIP.sh script..
Code:
cru a CheckVPNIP "15 * * * * /jffs/scripts/ChkVPNIP.sh"

What did I wrong?

Really? Can see/understand what is missing now??:rolleyes:

PEBCAK
 
Last edited:
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
emanuel@RT-AC86U:/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.
 
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
emanuel@RT-AC86U:/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?

What happens if you run the script like this?
Code:
./ChkVPNIP.sh

grep ChkVPNIP /tmp/syslog.log

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.

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:
What happens if you run the script like this?
Code:
./ChkVPNIP.sh

grep ChkVPNIP /tmp/syslog.log

Then I get the following (Just used ./ChkVPNIP.sh):

(ChkVPNIP.sh): 15644 v1.01b VPN Public WAN IP checker.....


(ChkVPNIP.sh): 15644 ***ERROR*** Missing arg1 vpn_id e.g. 1,2,3,4 or 5

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


Does the cron job appear when you issue:

cru l
Than this is showed:

emanuel@RT-AC86U:/jffs/scripts/init-start# cru 1

Cron Utility
add: cru a <unique id> <"min hour day month week command">
delete: cru d <unique id>
list: cru l


Yes.
 
Last edited:
Then I get the following (Just used ./ChkVPNIP.sh):

Code:
emanuel@RT-AC86U:/jffs/scripts/init-start# cru 1

Cron Utility
add: cru a <unique id> <"min hour day month week command">
delete: cru d <unique id>
list: cru l

<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.
 
If I use cru l nothing happens.

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:
So we are back to your post #20 and post #19 where somehow you did manage to type 'cru l' correctly.
No. I did never use that code, because I don't now what for I should use it.

Did you create script '/jffs/scripts/init-start' ?
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:

emanuel@RT-AC86U:/tmp/home/root# cd /jffs/scripts
emanuel@RT-AC86U:/jffs/scripts# cat /jffs/scripts/init-start
cat: read error: Is a directory
emanuel@RT-AC86U:/jffs/scripts# ./init-start
-sh: ./init-start: Permission denied

Sounds for me, like init-start should not be a directory?
 
Last edited:
Code:
emanuel@RT-AC86U:/jffs/scripts# cat /jffs/scripts/init-start
cat: read error: Is a directory
Sounds for me, like init-start should not be a directory?
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

No. I did never use that code
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:
Status
Not open for further replies.

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top