Router - TG582N - Config Files: Difference between revisions
(Mention user.tpl and isp.def) |
m (Could use the new firewall level if it were configured OK.) |
||
Line 32: | Line 32: | ||
\$Id: user.ini,v 1.14 2015/08/30 16:20:31 adsb Exp $ |
\$Id: user.ini,v 1.14 2015/08/30 16:20:31 adsb Exp $ |
||
Needless to say, don't use this firewall level! |
Needless to say, don't use this firewall level unless it's configured properly! |
||
= Managing multiple config files on the router = |
= Managing multiple config files on the router = |
Revision as of 17:33, 3 March 2016
There are several files used to store the configuration of the TG582n. These can be seen by FTPing to the router
ftp> dir 200 Connected to (null) port 40524 150 Opening data connection for /bin/ls drwxr-xr-x 2 0 0 0 Jan 1 2000 tls -rw-r--r-- 1 0 0 200 Aug 30 17:23 phy.conf -r--r--r-- 1 0 0 9 Jan 1 2000 seed.dat -rwxr-xr-x 1 0 0 2 Dec 6 2014 xdsl.inf -rwxr-xr-x 1 0 0 3508 Jan 1 2000 isp.def -r--r--r-- 1 0 0 0 Jan 1 2000 stsDANT1010.20B.upg -rwxr-xr-x 1 0 0 92775 Aug 30 17:23 user.ini -rw-r--r-- 1 0 0 16646 Jan 1 2000 user.tpl -rw-r--r-- 1 0 0 67217 Dec 9 2014 security.cfg -rwxr-xr-x 1 0 0 26 Feb 11 2014 persistent.cnf 226 Options: -l : 10 matches total
The file named user.ini is probably the most interesting. The files isp.def and user.tpl between them appear to provide the factory default config, with the ISP specific config in isp.def.
From here on, it's the user.ini file we play with.
One can download the file contents to a local computer by a number of means - e.g. using the web interface, or FTP.
Storing the config in CVS
Your author is big in Software Configuration Management, and likes to store important config files in CVS. CVS can use keyword expansion to store version information etc. in the file. I wanted a way to store this information in the config file on the router. What I needed was a field which allows a large enough text string, and finally I found one - under firewall levels!
:firewall level add name=DummyEntry index=4 readonly=enabled udptrackmode=strict service=enabled proxy=enabled text="\\$Id$"
Now when I commit changes, and then restore the configuration file to the TG582n, the text is replaced by (e.g.):
\$Id: user.ini,v 1.14 2015/08/30 16:20:31 adsb Exp $
Needless to say, don't use this firewall level unless it's configured properly!
Managing multiple config files on the router
The command
:config list
shows all the user.ini type files on the router. If you want to store a copy of a temporary configuration, you can do for example:
:config save filename 30Aug15.ini
:config list Configurations file(s): 30Aug15.ini user.ini
The matching command :config load is used to load from a configuration file - it's perhaps worthwhile doing :config menu and selecting load to see the options available (whether to flush the existing config, whether to load IP settings, etc.).
The command :config delete filename=<filename> can be used to delete a no longer required config file.
Other pages regarding this router:
<ncl style=bullet maxdepth=5 headings=bullet headstart=2 showcats=1 showarts=1 showfirst=1>Category:Router TG582N</ncl>