Home/Support/Support Forum/remote reboot / change IP address / CGI
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

remote reboot / change IP address / CGI

0 votes
Hi.

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:
Code:
//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\n\r",deviceIpAddress); system(str);
and for reboot:
Code:
system("reboot");
..but it's not working! Probably because i don't have rights to do this..


Can some one help me?
Klemen
asked Jan 11, 2013 in Linux by klemen New to the Community (0 points)
recategorized Sep 20, 2013 by tuxembb

Please log in or register to answer this question.

2 Answers

0 votes
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:
toolchain/del_toolchain/packages/ubootenv
toolchain/del_toolchain/nvram/
toolchain/del_toolchain/libdigi/
answered May 2, 2013 by User143 Community Contributor (132 points)
0 votes
I am using this VPN provider to change my IP address https://www.iwasel.com/en/ 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,"
answered Nov 29, 2013 by dinaafifi New to the Community (1 point)
...