SphereCommunity
Sphere connection under LAN - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: General Help (/Forum-General-Help)
+--- Thread: Sphere connection under LAN (/Thread-Sphere-connection-under-LAN)



Sphere connection under LAN - Gil Amarth - 04-30-2013 06:48 PM

I have my server on my home computer and I have configured the sphere.ini and the routers ports to work well.
My players can log in without any problems to my server, my problem is I can´t log in from my second computer in the same lan that the UO server.

I can enter from the server at localhost with 127.0.0.1, but my other computer can´t enter even I set the correct LAN IP 192.168.1.131

The strange thing is my client can find the server, but not connect to it

10:35:0:Client connected [Total:1] ('192.168.1.129' 1/1)
10:35:0:Login 'GilAmarth'
10:35:0:Client disconnected [Total:0] ('192.168.1.129')

I can go into the first screen, where the name of my server is shown. But later it returns me a error message:

The client could not attach to the game server. It must have been taken down, please wait a few minutes and try again.


If I try the same client from one of my neighbours wifis, I can log in perfectly, so it´s not a problem of files. But somehow I cant log in from a lan connection.

Any ideas? Router configuration? Firewalls? Blood sacrifice? Tongue


RE: Sphere connection under LAN - Shaklaban - 04-30-2013 07:09 PM

after server selection sphere sends <serv.servip> to client, and client connects to that adress. i think this can be the problem.


RE: Sphere connection under LAN - Gil Amarth - 04-30-2013 07:26 PM

You are totally right, Shaklaban.

I have checked it, so the client catched this IP, tried to connect with the public IP and failed. If I put SERVIP 192.168.1.131 I can connect from LAN to my server, but then my players don´t.

Any form to connect both my players and me? Seems SERVIP is pretty exclusive.


RE: Sphere connection under LAN - RanXerox - 05-01-2013 01:20 AM

You need a router that can do "Source Routing": http://en.wikipedia.org/wiki/Source_routing


RE: Sphere connection under LAN - Gil Amarth - 05-01-2013 04:13 AM

I have solved with a bit of scripting:

[FUNCTION f_onaccount_login]
IF (STRMATCH(MyAdminLogin,<ARGS>))
SERV.SERVIP 192.168.1.131
ENDIF

And at ON=@LOGIN, in EventsPlayer
SERV.SERVIP <DEF.SERVER_IP>

So, when I´m connecting, temporally the servip is the correct to let me in, and when I finally log in, the servip returns to his correct value.
I suppouse my players couldn´t connect when I´m log in, but this is a minor problem because it is only 2 o 3 seconds.
It´s a bit banana scripting, but it works. xD


RE: Sphere connection under LAN - Dullais - 05-17-2013 09:09 AM

(05-01-2013 04:13 AM)Gil Amarth Wrote:  I have solved with a bit of scripting:

[FUNCTION f_onaccount_login]
IF (STRMATCH(MyAdminLogin,<ARGS>))
SERV.SERVIP 192.168.1.131
ENDIF

And at ON=@LOGIN, in EventsPlayer
SERV.SERVIP <DEF.SERVER_IP>

So, when I´m connecting, temporally the servip is the correct to let me in, and when I finally log in, the servip returns to his correct value.
I suppouse my players couldn´t connect when I´m log in, but this is a minor problem because it is only 2 o 3 seconds.
It´s a bit banana scripting, but it works. xD

I had the same problem. I put the internal ip into login.cfg (in my case it was "Loginserver= 192.168.1.100,2593" and configured the rooter to forward port 2593 to 192.168.1.100. and i could connect using internal ip, others can connect using external Smile


RE: Sphere connection under LAN - Gil Amarth - 05-17-2013 06:21 PM

The problem was not the ip at the loginserver, the problema was the servip.

If you have a servip with a external ÏP, when you access to your server, inmediatly you login with this external IP (whatever IP you have come from). In my case, my router denied this possibility, so I had to tricked the server a bit.


RE: Sphere connection under LAN - Dullais - 05-21-2013 01:20 AM

(05-17-2013 06:21 PM)Gil Amarth Wrote:  The problem was not the ip at the loginserver, the problema was the servip.

If you have a servip with a external ÏP, when you access to your server, inmediatly you login with this external IP (whatever IP you have come from). In my case, my router denied this possibility, so I had to tricked the server a bit.

I understand, I realy had the same problem. but the cript on login didnt work for me, so i tried this, my server has function that sets server ip to my static ip (thats used for 3 computers) on running it, and it doesnt change the ip, when someone from my network connect,s i just connect to it with my internal ip, and it works like a charm Smile
Anyway, iam glad that this works for u Smile


RE: Sphere connection under LAN - RanXerox - 05-21-2013 01:43 AM

Another solution is add a row to the "hosts" file on the machine you are using to connect to the server. The hosts entry maps the dns name to the internal IP.