Score:0

Old IP displayed in route table after Ubuntu image clone on new server

cn flag

I have cloned an existing Ubuntu image off of our AWS server, upgraded to 20.04, and am trying to configure the connection to the outside world. I've been running into a lot issues on the frontend where I would get 401 authentication failures every time I would try to log in via the web interface.

I did some digging and a lot of googling, and I found that the server was trying to resolve to the old server, instead of the new one.

Old Server IP = 172.9.8.7

New Server IP = 172.1.2.3

When I run route -n on my new server I see the following:

$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         172.9.8.7      0.0.0.0         UG    0      0        0 eth0
172.9.8.7      0.0.0.0         255.255.240.0   U     0      0        0 eth0

So I did some googling on some forums and found that the resolve.conf file was pointing to the wrong one. I changed it to point to this: /run/systemd/resolve/resolv.conf which had the old server IP where I modified it to the new one.

I then restarted the resolvconf service and see this:

$ sudo systemctl restart resolvconf.service
sudo: unable to resolve host ip-172-1-2-3: Temporary failure in name resolution

Running ifconfig shows the correct server IP. ufw is also disabled, and iptables is empty as this is the configuration of the live server.

What am I missing here? I can't seem to figure out why the physical server local ip is being rejected.

Server is running Ubuntu 20.04.

chili555 avatar
cn flag
Please edit your question to show: `cat /etc/netplan/*.yaml`
jabroni avatar
cn flag
@chili555 that directory is empty
chili555 avatar
cn flag
How are you managing networking in this server if not netplan? With nmcli? Or what??
jabroni avatar
cn flag
Not sure. This was cloned off a 16.04 ubuntu server. It looks like I may have to configure a netplan. Not sure how to do that, but I can look that up.
chili555 avatar
cn flag
If cloned from 16.04, you might find the details in `/etc/network/interfaces` Please edit your question to give the details if you get stuck. You can find example templates in `/usr/share/doc/netplan/examples`
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.