meazfpc wrote:I've been thinking about setting a static IP. The problem is that if I set my Rpi IP to, let's say 192.168.0.100, and the routeur to 192.168.0.1, but there is a problem if a plug in a new routeur with an address like 192.168.1.1.
Then have the system set its static ip address to a specific and known but unlikely to be used part of the subnet, say Whatever Dot 76 . When it's on your network, it would be at 192.168.0.76 and when it's on Bob's network, it would be at 192.168.2.76 . So all you need to access it is knowledge of which subnet is being used, which you can get from the dhcp server or by running ifconfig on any linux machine or ipconfig on a windows machine or by running fing on an android device.
You could also check Whatever Dot 76 on the new network to see if someone else is there and then use a known back up, how about Whatever Dot 176 ? Using this, you'd have a solution for almost all home type networks out there, I would bet.
You can also use fping in a script to get general information for what is going on and put this and other data into a local web server at the address and back up address you are using.
If you are headless, it can be nice to access the machine from any box running a web browser and on the network, something that you should be able to set up with shellinabox, which is in the repositories.
You'll probably also want to bring a usb thumb drive with software on it (even though the idea is to never really need it) although protecting it from potentially getting some sort of virus might be challenging. Perhaps some scheme for checking the drive on a linux box after its use and having some place on the drive the files stored in a way that a virus probably can't figure out. One program that can be useful is MobaXterm which should be available directly form the developers and not from some spyware laced site, well, it is surely available from the latter like all Windows stuff.
And while you don't need it here, it is also true that you can transfer small amounts of data via the ping command. What this means isn't just that if you compromised a certain presidential candidate's e-mail server but could only ping out, you'd still have a solution, it also means that less nefarious uses are potentially possible, such as using ping to send the ip address of a box even though the box can only ping out. I don't know if some routers automatically filter this data, but I think they absolutely should!