OpenVPN losing settings after reboot

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


Joined: 28 Sep 2006
Posts: 19

PostPosted: Wed Apr 24, 2019 17:42    Post subject: OpenVPN losing settings after reboot Reply with quote
I have a Linksys EA6400 (upgraded to R39469) and for some reason I keep losing settings after reboot. It seems the following values arent being saved to NVRAM

PPTP Server:
  • Server IP (empty after reboot)

OpenVPN Server:
  • Network (0.0.0.0 after reboot)
  • CA Cert (empty after reboot)


What are the nvram keys for those, I want to change them and then check with 'nvram show' after saving.
Sponsor
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 8021

PostPosted: Wed Apr 24, 2019 18:26    Post subject: Reply with quote
You've probably exhausted nvram in which to store the certs and keys. This is fairly common w/ older routers. Try enabling JFFS on the Administration page and storing the files there, then referencing them from Additional Config.

Code:
ca /jffs/openvpn/server/ca.crt
cert /jffs/openvpn/server/server.crt
key /jffs/openvpn/server/server.key
dh /jffs/openvpn/server/dh.pem


You could also store and reference them from USB if your router supports it.
Faw
DD-WRT Novice


Joined: 28 Sep 2006
Posts: 19

PostPosted: Wed Apr 24, 2019 19:31    Post subject: Reply with quote
eibgrad wrote:
You've probably exhausted nvram in which to store the certs and keys. This is fairly common w/ older routers. Try enabling JFFS on the Administration page and storing the files there, then referencing them from Additional Config.

Code:
ca /jffs/openvpn/server/ca.crt
cert /jffs/openvpn/server/server.crt
key /jffs/openvpn/server/server.key
dh /jffs/openvpn/server/dh.pem


You could also store and reference them from USB if your router supports it.


Well, I found out the key names, set the config and when I check with 'nvram show' everything is set, with 37K of 64K nvram used.

I created a startup script setting the nvram values and when I check the config it is set. If I click "Apply Settings" both services start and work. Is there a way to "Apply settings" from the startup script?
eibgrad
DD-WRT Guru


Joined: 18 Sep 2010
Posts: 8021

PostPosted: Wed Apr 24, 2019 19:53    Post subject: Reply with quote
You can use the following command.

Code:
nvram commit


But if you're having to do this, there's something else wrong. I don't generally recommend rewriting flash (the whole block btw) every time the router reboots (which is what the commit does).
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 3490
Location: Netherlands

PostPosted: Thu Apr 25, 2019 8:17    Post subject: Reply with quote
These EA series have a dual boot setup, you can not go over 32K of NVRAM, at least that was with my EA6900.

In my signature is a setup guide for the EA6900 with ways to mitigate the 32K problem (startup command to delete all unused nvram parameters)

_________________
Routers: Netgear R6400v1, Netgear R6400v2, Linksys EA6900 (XvortexCFE), Linksys E2000 (converted WRT320N), WRT54GS v1.
Install guide Linksys EA6900: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=291230
Simple PBR (Policy Based Routing) script: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318662
Install guide R6400v2:http://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
OpenVPN server setup guide:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318795
Faw
DD-WRT Novice


Joined: 28 Sep 2006
Posts: 19

PostPosted: Thu Apr 25, 2019 19:26    Post subject: Reply with quote
egc wrote:
These EA series have a dual boot setup, you can not go over 32K of NVRAM, at least that was with my EA6900.

In my signature is a setup guide for the EA6900 with ways to mitigate the 32K problem (startup command to delete all unused nvram parameters)


I did the 'clearing empty nvram' script and don't get the problem anymore. Nvram Memory stays at 25K. Thanks for the help.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum 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