Connecting from one machine on the LAN to another machine on the same LAN through the router's public IP address using static NAT/"port forwarding" requires explicit support from the router. Not every device can do it.
It's called hairpinning.
problem with LAN connection enet udp
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: problem with LAN connection enet udp
@togFox can you show a snapshot of your router configuration?
Re: problem with LAN connection enet udp
I'll do that in a few days - after vacation. Thanks!
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Turn-based PBEM horse stable (racing) management sim: https://togfox.itch.io/horse-stable-manager
https://discord.gg/HeHgwE5nsZ
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Turn-based PBEM horse stable (racing) management sim: https://togfox.itch.io/horse-stable-manager
https://discord.gg/HeHgwE5nsZ
Re: problem with LAN connection enet udp
Establishing a server with sock.lua
Code: Select all
server = Sock.newServer("*", 22122)
Code: Select all
client = Sock.newClient(GAME_SETTINGS.hostIP, tonumber(GAME_SETTINGS.hostPort))
if on internet/WAN then GAME_SETTINGS.hostIP = whatever 'whatsmyip' says.
GAME_SETTINGS.hostPort = 22122
Edit: to reiterate, sock on same machine and LAN works. Internet does not work. Sock doesn't throw an error so idk. It looks like the client searches and times out.
Let me know if this is not the right screen.
Thanks.
Last edited by togFox on Mon Dec 20, 2021 10:05 pm, edited 1 time in total.
Last project:
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Turn-based PBEM horse stable (racing) management sim: https://togfox.itch.io/horse-stable-manager
https://discord.gg/HeHgwE5nsZ
https://togfox.itch.io/hwarang
A card game that brings sword fighting to life.
Current project:
Turn-based PBEM horse stable (racing) management sim: https://togfox.itch.io/horse-stable-manager
https://discord.gg/HeHgwE5nsZ
- EngineerSmith
- Prole
- Posts: 38
- Joined: Thu Dec 02, 2021 11:38 am
- Contact:
Re: problem with LAN connection enet udp
Looking at it your NAT looks fine as it should accept 22122 and then redirect to 192.168.20.4:22122 (Make sure that is your server's private ip; as some routers usually refresh/cycle ip addresses every 24 hours or so unless you've assigned it to it's mac address)
If firewall allows LAN within the private network then, it should allow WAN - so it wouldn't be an issue there. So just double check your server's private ip for the NAT. It's the only thing I can think of looking at it
If firewall allows LAN within the private network then, it should allow WAN - so it wouldn't be an issue there. So just double check your server's private ip for the NAT. It's the only thing I can think of looking at it
Who is online
Users browsing this forum: Bing [Bot] and 1 guest