I'm developing a personal project and one part of the project is a php website, hosted at hostinger as a free plan, that allow clients to ping to it and stores the WAN IP and the NAT IP of them.
They can ping to the web page just making a GET request to: mywebsite/ping.php?ip=XXX.XXX.XXX.XXX&description=USERNAME
where 'ip' is the NAT IP and 'description' is a parameter to store the name of the user.
// Snippet of ping.php
// obs.: didn't handled the inputs in a correct way because I'm just testing
$real_ip = $_SERVER ['REMOTE_ADDR'];
$ip = isset($_GET ['ip']) ? $_GET ['ip'] : '';
$description = isset($_GET ['description']) ? $_GET ['description'] : '';
if (!empty($ip)) {
// If ip is not set or empty, do not save anything
// saves the ip (nat), description and the real ip into database
}
else
{
// do nothing
}
My website is up and running. I tested it and it saves my real and local ip. I also created a php file to see a list of all clients that ping the server.
The mistery
I deployed the website online yesterday and made some tests pinging to it. It stored my IP ok. Today I stopped working on it a little bit and when I was back I realized that 10 different IPs pinged my ping.php file with the 'ip' parameter set to their local NAT IP. See the IP's list here
During the time that I was off I'm sure that none of my client programs pinged to the file since my PC was shutdown. Also the IPs found (real IP, not NAT) were all different from mine (mine didn't change until the time I checked the ghost IPs).
Question: How is that possible someone reach a php file on web and make a request using the righ parameters since just me and god knows about the existence of this php file on my web server?
Additional information
- In my .htaccess located in htm_public, I disabled the indexing.
- Nobody but me accessed my hostinger account
- There is no index or default page on my web server, just the ping.php and show_all_ips.php
- I tried some Google dorks to find my ping.php file but couldn't find anything
No Access
to this script in yourrobots.txt
file? I have a feeling that web crawlers are indexing your script. Hence the increasing amount of IP addresses.