Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

ASUS Router NVRAM script

#!/bin/sh

    echo "Removing unused cert/key from nvram..."

    for i in 1 2 3 4 5
    do
       nvram unset vpn_crt_client$i\_ca
       nvram unset vpn_crt_client$i\_extra
       nvram unset vpn_crt_client$i\_crt
       nvram unset vpn_crt_client$i\_key
       nvram unset vpn_crt_client$i\_crl
       nvram unset vpn_crt_client$i\_static
    done

    for i in 1 2
    do
       nvram unset vpn_crt_server$i\_ca
       nvram unset vpn_crt_server$i\_dh
       nvram unset vpn_crt_server$i\_ca_key
       nvram unset vpn_crt_server$i\_extra
       nvram unset vpn_crt_server$i\_client_crt
       nvram unset vpn_crt_server$i\_crl
       nvram unset vpn_crt_server$i\_crt
       nvram unset vpn_crt_server$i\_key
       nvram unset vpn_crt_server$i\_static
       nvram unset vpn_crt_server$i\_client_key
    done

    nvram commit

    echo "done."
Source by www.snbforums.com #
 
PREVIOUS NEXT
Tagged: #ASUS #Router #NVRAM #script
ADD COMMENT
Topic
Name
3+1 =