It's bothering me. I'm an amateur at Linux networking so pardon me on that. I've heard terms like NATTED IP from others. But I am not sure what do they mean.
A serious issue has arouse. And I need to debug this.
Assume the IP with which I access the remote server is A.B.C.D
. Some call it NATTED IP.
Assume the IP I get from ip a
command is E.F.G.H.
I can curl/telnet/ping
E.F.G.H
but notA.B.C.D
. Why?I can curl
localhost
but not the NATTED IP. Why?How do I figure out if the server's IP address was altered at some point of time? What logs can I check for it?
That IP was used in 3 different places, assume in NEPAL.conf
, INDIA.conf
and PAKISTAN.conf
I already know the fix of this issue, but I want to reverse engineer how this happened. That's the goal of asking this question!
In NEPAL.conf
, the IP address of api server used is A.B.C.D
Access: 2023-10-10 17:49:06.302410326 +0545
Modify: 2021-01-07 11:14:28.259435813 +0545
Change: 2023-10-08 11:18:43.987203621 +0545
This is what the stat command shows.
In INDIA.conf
, we needed some different IP address not A.B.C.D
or E.F.G.H
. But there is a typo on this IP.
Access: 2023-10-10 17:26:54.613930249 +0545
Modify: 2022-10-12 15:10:51.731213409 +0545
Change: 2023-09-24 12:31:52.801053008 +0545
https://stackoverflow.com/questions/3385203/what-is-the-access-time-in-unix
What is the difference between modify and change in stat command context?
It seems the change means only change in metadata of file.
As per https://www.grymoire.com/Unix/Inodes.html
the metadata of file consists of following.
Mode/permission (protection)
Owner ID
Group ID
Size of file
Number of hard links to the file
Time last accessed
Time last modified
Time inode last modified
In no world, it can be true that since 1 year this ip address is wrong. It means a big fat module of this app isn't working since 1 year.
Now I go to PAKISTAN.conf
, here also we're using A.B.C.D
instead of E.F.G.H
.
The output of stat here seems plausible.
Access: 2023-10-10 17:33:33.716178074 +0545
Modify: 2023-10-09 13:41:36.536314722 +0545
Change: 2023-10-09 13:41:36.537314712 +0545
I'm unable to make sense of all these stuffs. Please guide me.
That IP was used
which one?in 3 different places, assume in NEPAL.conf, INDIA.conf and PAKISTAN.conf
what are we assuming? what are these.conf
things? What is their purpose? – Jaromanda X Oct 11 '23 at 04:20It's not relevant. to my question
what isn't? if it's not relevant, then why is it in the question which is already a word salad – Jaromanda X Oct 11 '23 at 04:56ip a
? On which machine you run this command? On which machine you try to curllocalhost
? On which machine or machines are the filesNEPAL.conf
,INDIA.conf
andPAKISTAN.conf
used? Which of these files contain address A.B.C.D and which ones E.F.G.H ? – raj Oct 11 '23 at 13:58ip a
which would show you the addresses of the host you run it on. One might assume you're running that on some local system, not the remote server, but you're not saying if that's the case or not. We can't tell why you can't access the server, because we don't know what else there is. With network issues, it usually helps (read: it's almost required) to draw an image of the devices involved and whatever there is between them. – ilkkachu Oct 11 '23 at 14:24ip a
is collected from, we don't know what the configuration files are for, and it's really hard to tell what the timestamps of the files are supposed mean. – ilkkachu Oct 11 '23 at 14:25