My LAN consists of a BT "Smart Hub" router, a desktop computer connected via ethernet to the router and a laptop connected via wifi to the router.
I am attempting to use a lua library called "lua socket" in order to send udp packets between the two computers.
I have copied some very generic server and client scripts from here in order to see whether or not packets are actually arriving.
My desktop is configured to have a static private IP address within the LAN and if I run both the server script and the client script using a random port and the desktop's private IP, the server successfully recieves the messages.
I was hoping that I could fire up the client script on the laptop and target the same IP and the same port and the udp packet would show up on the desktop but this doesn't seem to work.
I have many questions about this as my knowledge of networking is lacking:
Could it be that the windows firewalls of either computer or the firewall of the router are interfering with the packets?
Do I need to be sending the packets from the laptop to the default gateway and use portforwarding so they can reach the desktop?
Is the fact that the laptop is connected via wifi rather than ethernet causing a problem?
Are there more issues that I am not currently aware of?
Thanks for any advice (or pointers to further information) that you can give me.
udp:setpeername("127.0.0.1", 53474)
in the example code. You're not using 127.0.0.1 on either the client or the server, correct? Don't. 127.0.0.1 on the server side will exclude receiving traffic from any other machine, and on the client side it means sending to yourself, of course. Did you try doing this the opposite direction, reversing client and server between the two machines? Did you turn off the windows firewall? Can the two machines ping each other? Have you tried Wireshark? – Michael - sqlbot