Is there a tool to generate a config.xml file?
-
- Novice
- Posts: 25
- Joined: Fri Nov 05, 2010 12:33 pm
Is there a tool to generate a config.xml file?
I need to separate wlan and eth interfaces, instead of using br0, and tell the router to nat all wlan clients on eth... unfortunately my wireless interface isn't supported by routertech firmware yet so I need to use the latest original firmware for a D-Link G624T (Hw A5, 32MB)
I think it's technically possible to *manually* implement this configuration with the original firmware... I thought about config.xml file
So I'd like to use a tool to generate a config.xml file for this kind of lan grouping
or otherwise I hope to find someone that gently send me a config.xml generated from a running RT firmware installation
or I'll must flash RT -> generate config.xml -> flash the original firmaware (I'd like to avoid this solution )
I think it's technically possible to *manually* implement this configuration with the original firmware... I thought about config.xml file
So I'd like to use a tool to generate a config.xml file for this kind of lan grouping
or otherwise I hope to find someone that gently send me a config.xml generated from a running RT firmware installation
or I'll must flash RT -> generate config.xml -> flash the original firmaware (I'd like to avoid this solution )
Re: Is there a tool to generate a config.xml file?
You can convert a binary config.bin to/from a text editable xml version using mcmcc's cfgconv utility http://mcmcc.bat.ru/acorp/utils/
Not sure this will help you achieve your aims, the 'core logic' that reads this config would have to support the functions you require and they would just be missing from the web gui?
Not sure this will help you achieve your aims, the 'core logic' that reads this config would have to support the functions you require and they would just be missing from the web gui?
- thechief
- RouterTech Team
- Posts: 12067
- Joined: Wed Feb 01, 2006 10:22 pm
- Location: England, the Centre of Africa
- Contact:
Re: Is there a tool to generate a config.xml file?
Isn't this mainly an iptables issue? (i.e., you may be able to do this with iptables commands).mrfree2ita wrote:I need to separate wlan and eth interfaces, instead of using br0, and tell the router to nat all wlan clients on eth
The Chief: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
No support via PM. Ask all questions on the open forum.
-
- Novice
- Posts: 25
- Joined: Fri Nov 05, 2010 12:33 pm
Re: Is there a tool to generate a config.xml file?
@mstombs
reading che config.xml file it uses lan group and bridge tag like RT firmware do (at lease apparently), so I think it has the logic to handle a little different network definition
@thechief
yup, I'll try to configure it manually via iptables and I think it should work... meanwhile I'm searching for a "clean" solution to implement this
If it isn't possible I think I can add some iptables magic to some init script or firewall specific boot script (start/stop for example)
I noticed the dlink firmware uses per default two bridge br0 and br1, the first uses all interfaces and the second is "empty". I think I could simply move wlan0 to br1 to achive my goal, but in this case I still need to tell router to nat br1 over br0.
Is there any config.xml file syntax definition (DTD or a simple list of possible tags)?
reading che config.xml file it uses lan group and bridge tag like RT firmware do (at lease apparently), so I think it has the logic to handle a little different network definition
@thechief
yup, I'll try to configure it manually via iptables and I think it should work... meanwhile I'm searching for a "clean" solution to implement this
If it isn't possible I think I can add some iptables magic to some init script or firewall specific boot script (start/stop for example)
I noticed the dlink firmware uses per default two bridge br0 and br1, the first uses all interfaces and the second is "empty". I think I could simply move wlan0 to br1 to achive my goal, but in this case I still need to tell router to nat br1 over br0.
Is there any config.xml file syntax definition (DTD or a simple list of possible tags)?
- thechief
- RouterTech Team
- Posts: 12067
- Joined: Wed Feb 01, 2006 10:22 pm
- Location: England, the Centre of Africa
- Contact:
Re: Is there a tool to generate a config.xml file?
None that I know of. You will have to do it by trial and error. The iptables approach, if it works, would be a clean approach. All you would need do is to put it in a script and run the script each time you restart the router.mrfree2ita wrote:Is there any config.xml file syntax definition (DTD or a simple list of possible tags)?
The Chief: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
No support via PM. Ask all questions on the open forum.
-
- Novice
- Posts: 25
- Joined: Fri Nov 05, 2010 12:33 pm
Re: Is there a tool to generate a config.xml file?
Ok... If I replace config with Do I will be able to reset to default config pushing the reset switch on the back?
Code: Select all
put my_config.xml "config.xml mtd3"
Re: Is there a tool to generate a config.xml file?
You need the bin format to load into flash - there's an example in the RouterTech firmware downloads. This isn't usually needed because there is a default config.xml in the readonly filesystem.
Reset button 'should' restore the default - BUT its a software reset and sometimes the software monitoring the reset switch dies, so you cannot rely on that.
You should be a able to use the bootloader pc-tool/ ftp interface again though.
Reset button 'should' restore the default - BUT its a software reset and sometimes the software monitoring the reset switch dies, so you cannot rely on that.
You should be a able to use the bootloader pc-tool/ ftp interface again though.
-
- Novice
- Posts: 25
- Joined: Fri Nov 05, 2010 12:33 pm
Re: Is there a tool to generate a config.xml file?
Where the router search for config when it starts? I mean if I change the /etc/config.xml file the router will read it?
Re: Is there a tool to generate a config.xml file?
The router reads the config from the flash mtd3 partition. This is a special 64kB block first 10K is for the env vars. You won't easily change /etc/config.xml - that will be embeddded in the readonly squashed filesystem. Many router GUIs have options to save /reload configuration?
-
- Novice
- Posts: 25
- Joined: Fri Nov 05, 2010 12:33 pm
Re: Is there a tool to generate a config.xml file?
mstombs the tool you have suggested works great, but if I try to simply remove eth0 from bridge br0 for example the ap doesn't come up... I'll try to read messages via serial console
Meanwhile which is the best way to add custom commands after boot?
I notice there is a single /etc/init.d/rcS script and a firewall-start script is there another way? I need to make my changes after all interface are up
Meanwhile which is the best way to add custom commands after boot?
I notice there is a single /etc/init.d/rcS script and a firewall-start script is there another way? I need to make my changes after all interface are up
- thechief
- RouterTech Team
- Posts: 12067
- Joined: Wed Feb 01, 2006 10:22 pm
- Location: England, the Centre of Africa
- Contact:
Re: Is there a tool to generate a config.xml file?
Check the telnet scripter here: viewtopic.php?f=19&t=282mrfree2ita wrote:Meanwhile which is the best way to add custom commands after boot?
The Chief: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
No support via PM. Ask all questions on the open forum.
-
- Novice
- Posts: 25
- Joined: Fri Nov 05, 2010 12:33 pm
Re: Is there a tool to generate a config.xml file?
But I don't want to start a telnet session from my pc every time the router reboots... I need it runs some commands itselfthechief wrote: Check the telnet scripter here: viewtopic.php?f=19&t=282
Re: Is there a tool to generate a config.xml file?
I wouldn't have thought there was any way to auto run custom commands in stock D-Link firmware. The scripts you refer to will be embedded in the readonly flash file system. There's an example here how a user who didn't want to mess with 3rd party firmware used "expect" under Linux to telnet in and reconfigure his D-Link router
http://www.csc.liv.ac.uk/~greg/projects/dlink.html
http://www.csc.liv.ac.uk/~greg/projects/dlink.html