# remote reboot / change IP address / CGI

**URL:** <https://forums.digi.com/t/remote-reboot-change-ip-address-cgi/4413>\
**Category:** Linux\
**Tags:** linux\
**Created:** [January 11, 2013, 7:51am UTC](https://forums.digi.com/t/remote-reboot-change-ip-address-cgi/4413 "2013-01-11T07:51:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![klemen](https://avatars.discourse-cdn.com/v4/letter/k/9e8a1a/32.png) [@klemen](https://forums.digi.com/u/klemen)\
**Post date:** [January 11, 2013, 7:51am UTC](https://forums.digi.com/t/remote-reboot-change-ip-address-cgi/4413/1 "2013-01-11T07:51:19Z")

</div>

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:

```auto

//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
\r",deviceIpAddress);
system(str);

```

and for reboot:

```auto
system("reboot");

```

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

Can some one help me?  
Klemen

---

<div class="post-metadata">

**Author:** ![thomas.kuhlmann](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/thomas.kuhlmann/32/7_2.png) [@thomas.kuhlmann](https://forums.digi.com/u/thomas.kuhlmann)\
**Post date:** [May 2, 2013, 6:55am UTC](https://forums.digi.com/t/remote-reboot-change-ip-address-cgi/4413/2 "2013-05-02T06:55:43Z")

</div>

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/

---

<div class="post-metadata">

**Author:** ![dinaafifi](https://avatars.discourse-cdn.com/v4/letter/d/b3f665/32.png) [@dinaafifi](https://forums.digi.com/u/dinaafifi)\
**Post date:** [November 29, 2013, 3:44am UTC](https://forums.digi.com/t/remote-reboot-change-ip-address-cgi/4413/3 "2013-11-29T03:44:25Z")

</div>

I am using this VPN provider to change my IP address [https://www.iwasel.com/en/](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,"
