FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
160 views 2 comments
by anonymous
Hi All:

I just spent 2 hours on an RUT-950 that had a GPRS connection, could ping www.yahoo.com. could ping the VPN responder but strongswan just did this:

root@CORS70:~# ipsec status                                                                             

Security Associations (0 up, 1 connecting):                                                             

       SOICC[1]: CONNECTING, 100.64.245.110[CORS70]...103.205.244.106[CCrouter]                         

root@CORS70:~#     

It just stayed there like that. I used /etc/ini.d to restart ipsec, i used ipsec stop, ipsec start, ipsec restart.....nothing. Same message above.

Ok, something with strong swan, but ping_reboot is configured and the unit did nothing. I just sate there.

Here is my ping_reboot file:

config ping_reboot

option action '1'

option time '4'

option packet_size '56'

option time_out '5'

option interface '1'

option stop_action '0'

option host '192.168.48.1'

option retry '1'

option enable '1'

option fail_counter '0'

config ping_reboot

option enable '0'

My question is, the last 2 lines, are they overriding the "option enable '1' " line"

Should I get rid of those last two lines?

Cheers,

John
by anonymous
We are seeing this issue on several units, should I delete those last two lines?

Cheers,

john

2 Answers

0 votes
by anonymous
Hi,

Yes, you're right, the last two lines really could override the configuration, delete them and see if you're able to get your ping reboot working.

Also, you may try installing new firmware for your device as it may contain important fixes that would let you avoid situations like this in the future.

EB.
by anonymous
I can't install new FW as it breaker stongswan.

See my unanswered question on that.

Put simply, the ping_reboot DOES NOT WORK!

I'll have to write my own I guess.

JOhn
0 votes
by anonymous
ok, the teltonika ping reboot does not work, so I wrote this and parked it in the /root directory as isalive0.8.sh:

#! /bin/bash

#echo first arg is $1

#Save the first command argument as pinghost

pinghost=$1

#echo pinghost is $pinghost

#Initialize loopcount to zero

loopcount=0

#loop forever

while 1>0

do

#send a single ping with timeout to pinghost

ping $pinghost -W 5 -c1

#Check pings return value, if zero(success)

if [ $? -eq 0 ];

then

#echo Successful ;

#the ping was successful to reset the loopcount variable

loopcount=0;

else

#echo Failure ;

#The ping failed so tunnels are down, inc loopcount

loopcount=$(($loopcount + 1));

fi

#echo loopcount is $loopcount

#If loopcount exceeds 5, then reboot

if [ $loopcount -gt 5 ];

then

#echo WE WOULD RESTART HERE;

logger -t ping_reboot "Ping timeout to $pinghost"

reboot

fi

# sleep 30 is a reboot time of ~3:30

# sleep 35 is a raboot time of ~3:55

# sleep 40 is a reboot time of ~4:05

# sleep 45 is a reboot time of ~4:55

sleep 45

done

My second last line of my /etc/rc.local file is this:

sh /root/isalive0.8.sh 192.168.48.1 &

This works perfectly. If 192.168.48.1 does not answer pings within about 4 minutes, the router reboots at 5 minutes.

This works whether interfaces are up or not.

Cheers,

john