remote reboot / change IP address / CGI


I made a configuration html page (+cgi) through wich i can change some settings on my digi (writing to some files).
Now i want to also remotely change the IP address and remotely reboot my digi!

i tried for IP address:

//deviceIpAddress is s string parameter that i get if from cgi input
sprintf(str,"PATH=$PATH:/sbin ifconfig eth0 %s etmask255.255.255.0 up

and for reboot:


…but it’s not working! Probably because i don’t have rights to do this…

Can some one help me?

the reboot should work.
however ifconfig will only change the IP temporary during runtime.
To change the IP permanently you need to change it in nvram, e.g. with “ubootenv” or by including libnvram to your CGI and calling NVRAM API functions.

You can find the source code on the Digi Embedded Linux DVD in:

I am using this VPN provider to change my IP address for a couple of months. There are many european servers.
They have good speed The best thing is that there is no traffic limit. I am online pretty much the whole time,"