How to tell if someone is trying to use the IP Address

hostingip addressnetworking

I use a relatively low-cost host for my personal server, and occasionally I get a rash of downtime alerts. These are all from today.

Downtime alerts

If my host were to ("accidentally") assign my IP to someone else, and that server came online and started fighting with mine for control of the IP, would it look like this? If not, I guess I have to assume the host is having hardware or network issues, or is possibly dealing with some sort of DoS attack, right? Of course, their client portal and company website are also suffering downtime, too; making it all but impossible to contact them and ask what's happening.

In the past I have occasionally seen this type of activity correlate with attempting to access my website and seeing the default website from a different server (which makes sense, since they wouldn't have host settings for my domain).

Short of manually checking all of my domains to see if something unexpected comes back, is there anything I can do to detect someone else attempting to use my IP address?

Best Answer

If you want to know if another host on the same segment is sending ARP replies when requests for your IP is being sent, the simplest approach is to simply send some requests yourself and verify whether you get a response. Here is an example command (and use your own IP address here):

arping -I eth0 198.51.100.241

If you suspect that it only happens intermittently, then running a tcpdump command in a screen session can collect evidence of this happening:

tcpdump -pni eth0 'arp' -s0 -Uw /var/tmp/arp.pcap

If neither approach give you sufficient information, you can start looking for other clues.

The IP address conflict will only affect packets being sent in one direction. So if you set up software on the server and elsewhere to periodically send a packet to each other and keep track of the sending as well as receiving time of each packet, then you will be able to see if packets are lost in one direction and not the other.

Additionally the IP address conflict is more likely to only affect one address family. So when your IPv4 address is unreachable you can log in using IPv6 and investigate as the problem is ongoing.

Finally simultaneous traceroutes from each end both during an outage and during normal operation will provide lots of information about the exact location of the outage.