Generating an ini file with specific fields - easiest way?

Associate
Joined
20 Mar 2010
Posts
66
We use ini files in work for uploading templates to certain routers. We change specific fields in the templates depending on what IP range the customer wants, wether they want NAT/NO NAT, DHCP enabled, port forwards etc etc.

At the moment we edit the fields but this can lead to parts being missed out or simple mistakes in the form.

I want to make something that will enable us to simply fill in some text boxes asking things such as:

IP RANGE :
SUBNET MASK :
DHCP ON/OFF :
ROUTER PASSWORD :
NAT/NO NAT :
PORT FORWARDS :
ETC :
ETC :

It will then generate the form with the fields filled in. I've put part of a ini template below.

I know this must be possible but what would be the easiest way for me to achieve this?

Thanks

-------------------------------------------------------------------------------------------------------------------
[ diagnostics.ini ]
config pingtimeout=1000 pingpacketsize=32

[ dnsc.ini ]
config timeout=5 retry=4 search=enabled trace=disabled
dnsadd addr=127.0.0.1 port=53

[ dnss.ini ]
config domain=lan timeout=15 suppress=0 state=enabled trace=disabled syslog=disabled WANDownSpoofing=enabled WDSpoofedIP=198.18.1.0
host add name=dsldevice addr=0.0.0.0 ttl=1200
host add name=speedtouch addr=0.0.0.0 ttl=1200

[ dhcs.ini ]
debug traceconfig state=disabled
policy verifyfirst=enabled trustclient=enabled
pool config name=LAN_private intf=LocalNetwork poolstart=192.168.0.2 poolend=192.168.0.254 netmask=24 gateway=192.168.0.1 server=192.168.0.1 leasetime=86400

[ dhcr.ini ]
ifconfig intf=LocalNetwork relay=enabled
add addr=127.0.0.1 intf=LocalNetwork giaddr=192.168.0.1

[ dhcc.ini ]
debug traceconfig state=disabled
-------------------------------------------------------------------------------------------------------------------
 
Back
Top Bottom