Private Network IP problem

Hello,

I have a simple client server Xojo app that works great on public networks but when I try to use in on private/internal networks (using the ip4 addresses from ipconfig) I always get a server DNR. Is there something special I have to do on private networks to get the two talking to each other? Any help would be appreciated.

Your private network is probably behind a router/NAT, which means that inbound connections from the internet need to be forwarded from the router to the computer that’s running the server. Check your router’s manual for “port forwarding”.

Hey Andrew,

These are not inbound from the internet but from computers within the private network. They are all 172.168.XX.XX ip addresses

What port are you using in your application?

I am using port 4900

You might want to check and make sure Windows Firewall allows incoming on that Port or if Anti-Virus is blocking incoming or outgoing on that Port.

Hey…yeah I opened up that port specifically on Windows Firewall with a incoming rule etc. Now the ip4 IP address is the one I want to use right?

You need to open the port on the firewall on the server machine for incoming Then yes use the ip4 address to connect to the server from the client.

i recently had a vEthernet (switch) in windows that took my main system ethernet. Xojo couldn’t connect untill i set it to off in network adapter settings. Windows will automaticly create a new vEthernet (virtual switch) and it worked.

Or try to see if your sockets have the right NetworkInterface selected. (since i had 2 for example)

Tell us more about your app architecture. Is the server app a web application? How do the clients connect?

Hey. Its just a simple Xojo client/server desktop application (not a web app). The client connects via TCP to the server on port 4900 but I get a server DNR on every call. When I tried this on my AWS server it worked fine with public/static IP addresses but as soon as I put it on the local private network it would not talk to each other using the ip4 address. I opened up 4900 on Windows Firewall with a rule and still no luck. My client is getting frustrated that I cannot figure this out :-(. Both computers are hard wired via Ethernet to the router.

What’s the ip address of both machines?

The server is on 192.168.1.121 and the client is on 192.168.1.254 as I recall

Can you ping the server from the client?

I didnt try that actually. I will give it a try and see what it says

What is the server OS? (I know it is Windows, but what version / flavor). Also can you ping the client from the server?

@Michael Martz — On another note, you are using a port number (4900) which is registered to IANA by another application. You might want to move to an unassigned port number, e.g. 4895. See iana.org

I tried using Port 4895 with no luck. I still get error 103 or unreachable host. I did a ping on the ip4 address and it responds. Both machines are on Windows 10. I did a port scan of the server computer and port 4895 is open

you might wanna check the response from socket.localaddress if one of them is off from what it should be you’lll know where to look.

Derk. I just checked that out and it did return the correct IP address of 192.168.1.121