Joined: 02 Jan 2015 Posts: 87 Location: Gdansk, Poland
Posted: Fri Aug 30, 2024 6:55 Post subject: Configuration export and import selected values?
Hello,
Is it possible to export config file, clear all other entries but leave strings for static leases, access restrictions, VPN etc. and import it on fresh, cleared configuration?
there is some documentation or editor for configuration file?
I see entries
static_leases and all configuration in one line
but access restrictions and VPN config is not clear for me.
Or maybe there is another metod for partial export important settings
Joined: 18 Mar 2014 Posts: 13560 Location: Netherlands
Posted: Fri Aug 30, 2024 10:48 Post subject:
adasch wrote:
it's clear, but how import required data?
a have about 50 static leases, rewriting it manually is horrible.
similar situation with access restrictions,
current nvram 61 KiB / 64 KiB
is it possible create file with 2 lines like:
first header D-WRTÁwl_mac_deny wl_txstreams 0
second: static_leasesĂ
is it modify only static_leases and leave others unchanged?
Copy your static leases from /tmp/dnsmasq.conf to a text file on your desktop.
From there copy it back to the new or resetted route in DNSMasq Additional config.
Joined: 16 Nov 2015 Posts: 6785 Location: UK, London, just across the river..
Posted: Fri Aug 30, 2024 11:52 Post subject:
Static leases are easy, as the other said above, follow this format and than copy paste from txt file to advanced dnsmasq config box, than save & apply
First directive will send extra options tagged as "known" to machine with Ethernet address 11:22:33:44:55:66.
The other directive will ignore any clients which are not specified in dhcp-host lines. Equivalent to ISC "deny unknown-clients".
This relies on the special "known" tag which is set when a host is matched.
On linux (!) means NOT.
or depends on the router you have as it may not work on every router only the high grade routers may have kerneltzz time (you didn't mention it and you should) you can use IPtables commands via commands save firewall option
Lots of users always complain on easy set up and ect... but none of them did its own research, bear in mind i've found those on the forum...so, i did mine research and you have a free lunch...
My goal is to help others that will spend more time to research...and may find this info helpful..
I also dont use access restrictions, as those are not favourable to use around and not always produce the expected results..
P.S. you can also export router pages to, print to pdf than copy/paste values...i know lots of us are doing it...too... _________________ Atheros
TP-Link WR740Nv1 ---DD-WRT 58184 WAP
TP-Link WR1043NDv2 -DD-WRT 59369 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 59369 Gateway/DoT,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 59582 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 59582 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Dynalink DL-WRX36-DDWRT 59582
Broadcom
Netgear R7000 --DD-WRT 59582 Gateway/DNScrypt-proxy2/AD-Block,IPset Firewall,Forced DNS,x4VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Posted: Mon Sep 02, 2024 3:46 Post subject: Re: Configuration export and import selected values?
adasch wrote:
Is it possible to export config file, clear all other entries but leave strings for static leases, access restrictions, VPN etc. and import it on fresh, cleared configuration?
Or maybe there is another method for partial export important settings
The easyddup package (link in post #2) comes with two scripts to save and restore selected settings.
The save_mynvram.sh script is basic.
The nvram-save.sh script is more powerful.
Take a look at the easyddup-vars.ini.sample and nvram-dd-wrt.ini.sample for (possibly obsolete) examples of nvram variables to save/restore.
With some tweaking of the nvram variable names you could automatically save&restore the settings you care about.
Restore complete - 2 NVRAM variable(s)
Enter 'nvram commit' then reboot to activate your restored settings
Refreshed the browser on the backup router's services page and all the static leases appeared. This is so convenient for saving/restoring selected settings.