Ubuntu Gets/Has Wrong Private Ip Address

When I log in via SSH to my Ubuntu server (current LTS 20.04), I get a greeting message with the eth0 private IP.

I now needed to change my IPs in my home network from the default 192.168.178.0/24 to 192.168.222.0/24

In the greeting message it still says

eth0 192.168.178.30
eth0 192.168.222.20

It can't have both IPs???

Reboot won't do anything.

I have ufw installed, but ufw reload won't do anything.

I also have OpenVPN and PiHole installed. It seems that something needs to be reconfigured, but I don't know which software still wants to connect via 192.168.178.30

2

1 Answer

I did what netbat said:

sudo grep -l -R "192.168.178.30" /etc/*

this showed me 3 conf-files (and a db file). I changed the respective conf-files so with nano (didn't care about the db-file). In one file (/etc/dhcp/dhcpd.conf) I also needed to change the routers IP address.

Now with a reboot, the wrong IP address is gone!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Sarah Jenkins

Sarah Jenkins

Senior Technology Editor & AI Specialist

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.

Share this article
Twitter Facebook Pinterest