I got a new router, and my raspberry pi keeps adding the old IP to my system everyday. I have tried assigning a static ip, flushing the interface, making sure that the old ip is in none of the files, but everyday it adds the old route back. I use my pi as a pihole, so my wifi goes down everyday until I remove the old route. Can anyone help me out?
Your question is not clear, however, you can add
ifconfig eth0 192.168.1.X netmask 255.255.255.0 up to the rc.local. This file is located to
/etc, So, do the following:
sudo nano /etc/rc.local.
ifconfig eth0 192.168.1.X netmask 255.255.255.0 up to
/etc/rc.local. Note that add this command between
exit 0 and
X is the IP's host id.
You can also add
ifconfig eth0 192.168.56.X netmask 255.255.255.0 down to disable the unusable IP.
The rc.local script runs on each startup.