OpenVPN client + killswitch versus pool.ntp.org

Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking
Author Message
jassing
DD-WRT Novice


Joined: 30 Sep 2006
Posts: 22

PostPosted: Wed Jun 12, 2019 2:18    Post subject: OpenVPN client + killswitch versus pool.ntp.org Reply with quote
I have been battling a problem, and I couldn't see it until someone pointed it out. The date/time is not being updated on a reboot.

OpenVPN will fail if the time is not "close enough"; so when the router reboots:
* date/time is reset to a long-ago-date.
* OpenVPN connection fails.
* NTP client is not setting the time.

So on each reboot (or power outtage)
* I have to telnet into the router to set the date & time.
* Then use a non-chrome browser to disable the vpn client, then re-enable it.

I'm using US/Pacific (tried US/Pacific New) and pool.ntp.org

If I telnet into the router, I can ping pool.ntp.org so dns is working.

Any ideas on
A) how I can get date set on reboot
B) how to either delay openvpn client until date/time is set or reset it with a script after the date/time is set?

nb: I am using the router as a client, if that matters...

thanks.


Last edited by jassing on Wed Jun 12, 2019 2:47; edited 1 time in total
Sponsor
jassing
DD-WRT Novice


Joined: 30 Sep 2006
Posts: 22

PostPosted: Wed Jun 12, 2019 3:14    Post subject: Reply with quote
at first I thought that worked, but it didn't; it is reset to Dec 1969 after reboot.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Wed Jun 12, 2019 8:57    Post subject: Reply with quote
Do not enter anything in the Server IP/Name field leave it blank

What kill switch are you using?

Example of known good kill switch:
Code:
WAN_IF="$(ip route | awk '/^default/{print $NF}')"
iptables -I FORWARD -i br0 -o $WAN_IF -j REJECT

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
jassing
DD-WRT Novice


Joined: 30 Sep 2006
Posts: 22

PostPosted: Wed Jun 12, 2019 19:40    Post subject: Reply with quote
Yes, thanks - that's essentially what I used.
However, I updated the firmware from 36698 to 37305 and things got really wonky.

Below is more details, but essentially with 37305 once I get openvpn working, any change I make kills it (even simply hitting apply-changes kills it).

-----

after I updated from 36698 to dd-wrt 37305 things got strange

I restore the backup that I made in 36698 that doesn't include OpenVPN. Everything is working (dns, etc)
I go thru the steps of configuring OpenVPN
I reboot the router (OpenVPN working)
I backup the settings.

I make no changes, simply hit "Apply Changes" and OpenVPN is not running (no log or status in Status->OpenVPN) and I can no longer get to my upstream router, although the router does obtain a dhcp release from the upstream router. (I have not yet enabled any script at the firewall)

So I restore the settings after I got openvpn working, and ... Still doesn't work.
I must go back to the settings I saved in 36698, then re-configure everything or restore the 'open vpn working' backup)

(But even then, if I make any changes after I get openvpn working, the router essentially stops working)

I'm going to go back to 36698 and hope that it's not a hardware problem causing this...

Thanks!
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12837
Location: Netherlands

PostPosted: Wed Jun 12, 2019 20:24    Post subject: Reply with quote
After upgrading you have to reset to defaults by telnetting into your router and do: nvram erase && reboot

Put settings in manually never restore from a backup.

After you have made changes you have to reboot to get it working

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum