1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to save NVRAM by storing configuration externally?

Discussion in 'Tomato Firmware' started by gfunkdave, Jun 29, 2012.

  1. gfunkdave

    gfunkdave LI Guru Member

    I have an RT-N16 and when I configure two OpenVPN servers on it, I run out of NVRAM. Is there a way to save the OpenVPN configuration on a CIFS share so that the router can load it but not save it in NVRAM? How can I do this?

    Thanks!
     
  2. ppsun

    ppsun Networkin' Nut Member

    This is my config (1 vpn server only):

    Under Advanced -->> Custom Configuration, paste in:
    ca /jffs/openvpn/ca.crt
    cert /jffs/openvpn/vpnserver.crt
    key /jffs/openvpn/vpnserver.key
    dh /jffs/openvpn/dh1024.pem

    In jffs, create the directory /openvpn and copy in the 4 files:
    ca.crt
    vpnserver.crt
    vpnserver.key
    dh1024.pem

    These were the 4 files that you would have had generated originally to copy and paste the text into VPN Server Configuration. But, now that it resides externally in jffs, you can delete all the text in the four panels in Keys.

    Together with moving adblock script into jffs, it got my RT-N66U NVRAM back up to around 4kb (14%). I suppose it should be similar using CIFS, you just have to figure out the path.
     
  3. gfunkdave

    gfunkdave LI Guru Member

    I knew it had to be simple - thanks!
     
  4. fubdap

    fubdap Addicted to LI Member

    Is the adblock script the one that is suppose to be in the Wanup section of the router? If so, could you share how you did that. I have my adblock script in the wanup section. I cannot use the wanup section for anything else because of limited memory. By the way I have N16.
     
  5. ppsun

    ppsun Networkin' Nut Member

    Create the directory in jffs:
    \etc\config

    Put the adblock script file in the jffs\etc\config directory. It must be named with .wanup extension
    example: adblock_file.wanup

    The .wanup file must be in unix text format. Few ways to do this. I did it this way:
    1. Telnet into the router.
    2. vi create the .wanup file in the jffs\etc\config directory.
    3. Cut & paste the entire script from tomatousb wanup page into the vi editor.
    4. Lastly, save the vi created file.

    I did this some time ago and recalling from memory. Please try and let me know if I forgot anything.


    EDIT:
    Just remembered that I added:

    #!/bin/sh
    sleep 5

    as the first 2 lines in the .wanup file. Can't quite remember why but it works, so I left the lines in there. May have been something to do with the "ug" bug in RT-N66U.
     
  6. fubdap

    fubdap Addicted to LI Member

    Thanks providing the procedure.


     

Share This Page