Giu Member Licensed User Longtime User Jan 19, 2016 #1 Hi. I would like to create some kind of webapp to change the IP raspberry pi is using. I'm looking into info for webapps, but, somebody knows how to make the change of IP? Thanks.
Hi. I would like to create some kind of webapp to change the IP raspberry pi is using. I'm looking into info for webapps, but, somebody knows how to make the change of IP? Thanks.
Siam Active Member Licensed User Longtime User Jan 19, 2016 #2 Hi, you must write the new IP to /etc/network/interfaces i think the simplest way is you Overwrite this file with the new Settings(i'm not shure that this work). if your original config shows like this example: Code: Copy auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp auto wlan0 allow-hotplug wlan0 iface wlan0 inet static address 192.168.178.110 netmask 255.255.255.0 gateway 192.168.178.1 Then you must write all the data containig this file to the new file and only change the network settings. after that you must start a shell command ( jshell library) Code: Copy sudo /etc/init.d/network restart to update the settings But look out if you make here some errors you can't connect to the pi over the network. regards Andy Last edited: Jan 19, 2016 Upvote 0
Hi, you must write the new IP to /etc/network/interfaces i think the simplest way is you Overwrite this file with the new Settings(i'm not shure that this work). if your original config shows like this example: Code: Copy auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp auto wlan0 allow-hotplug wlan0 iface wlan0 inet static address 192.168.178.110 netmask 255.255.255.0 gateway 192.168.178.1 Then you must write all the data containig this file to the new file and only change the network settings. after that you must start a shell command ( jshell library) Code: Copy sudo /etc/init.d/network restart to update the settings But look out if you make here some errors you can't connect to the pi over the network. regards Andy
Giu Member Licensed User Longtime User Jan 19, 2016 #3 Thanks @Siam I will do some tests when have time. My main concern was about permissions Upvote 0
jinyistudio Well-Known Member Licensed User Longtime User Jun 17, 2016 #4 Hi I have this requirement too. Do you have solved your question with your method ? Upvote 0