I have adapted example PHP TCP listener (multi-client version, posted by javier in user contributed notes below main article, with my small fixes) to listen on port 7777 for any TCP packets / connections.
I've run this listener on my home server, via SSH, and in second SSH session I have run tcpdump
to listen on the same port, to verfiy, if my PHP listener is working fine.
Listener is written so, it echoes everything, it receives, back to client and prints it out on the console.
Whenever I contact my home server, with my browser, both my listener and tcpdump
are showing captured traffic, so I assume that everything is set and is working fine. But, when I try to contact the very same server on the same port from my another device (a GPS localizer) only tcpdump
shows, that it has captured anything, but my PHP listener remains deaf -- does not displays anything to the console (so I assume, that it also does not sends anything back to localizer -- though I can't verify this -- because, it is unable to capture any traffic from it).
As I have been told (thanks to helpful guys from SuperUser), TCP transmission from both webbrowser and GPS localizer seems to be valid TCP packet and everything in network layer seems to be fine, therefore it looks like, the problem is somewhere in PHP listener itself.
So, I'm asking, if anybody sees anything, that I missed here?