Local network accessibility

Post Reply
ex0r
Posts: 83
Joined: Wed Aug 29, 2012 10:08 pm

Local network accessibility

Post by ex0r » Thu Sep 13, 2012 8:39 pm

Is it possible in the core, to do a modification that can check if an account/character connecting is on the local network or not, and if so redirect the zoneIP to the local address, not the external address?

For example, I am running into a problem where when I open the server up to the world, I can no longer access it, since I can't ping or access my external IP from my local network, which means I can't play with my friends. Is it possible to do a check like this during zone, or whenever zoneip is used?

if (ip == internal) {
zoneip = calculation_for_getting_value (based off a predefined local IP as specified in the config file)
}
else {
retrieve zoneip from database
}

? I think that would cover bases for both parties, as some people dont have a router that supports external from internal, or have access to their router to change their settings.

bluekirby0
Developer
Posts: 707
Joined: Sun Jul 22, 2012 12:11 am

Re: Local network accessibility

Post by bluekirby0 » Sat Sep 15, 2012 5:05 am

Would need to be an added column for LAN IP in the db if we want to retain full functionality for both parties. Hardest part would be finding where to stick it in the code...actually coding it would be pretty easy. Updating the tutorials may be the hardest part of all with all the confused people seeing new errors though :P

ex0r
Posts: 83
Joined: Wed Aug 29, 2012 10:08 pm

Re: Local network accessibility

Post by ex0r » Sat Sep 15, 2012 10:00 am

why would it have to be a seperate column? Why couldn't the local IP be stored in the config, and the IP calculations done on it in the code? The formula is listed on that page on how to get the calculation

User avatar
diatanato
Developer
Posts: 112
Joined: Thu Aug 30, 2012 9:59 pm

Re: Local network accessibility

Post by diatanato » Sat Sep 15, 2012 10:51 am

don't use server pc for play in games ^^

bluekirby0
Developer
Posts: 707
Joined: Sun Jul 22, 2012 12:11 am

Re: Local network accessibility

Post by bluekirby0 » Sat Sep 15, 2012 2:45 pm

ex0r wrote:why would it have to be a seperate column? Why couldn't the local IP be stored in the config, and the IP calculations done on it in the code? The formula is listed on that page on how to get the calculation
The short answer is, if you wanted to spread zones across servers (which is the whole point of the zoneip table) that would imply that the same functionality would be expected on a LAN. If you set it to a fixed LAN IP then that would be impossible. With a small player base, that feature isn't terribly important, granted, but if you were running a major server with zones load-balanced across 2 or 3 machines locally and wanted to join your own server without a ton of overhead to do some admin/GM stuff then it would have to be done that way.

ex0r
Posts: 83
Joined: Wed Aug 29, 2012 10:08 pm

Re: Local network accessibility

Post by ex0r » Sat Sep 15, 2012 4:48 pm

well afaik load balancing isn't implemented anyways and probably won't be for a while so why would it be a big deal hard coding it?

and as for your response dial, that's absurd. maybe some people wanna play with only a couple friends and don't want to dish out 25-30$ a month on a server.

PrBlahBlahtson
Developer
Posts: 539
Joined: Sun Jul 22, 2012 12:17 am

Re: Local network accessibility

Post by PrBlahBlahtson » Sat Sep 15, 2012 5:33 pm

ex0r wrote:and as for your response dial, that's absurd. maybe some people wanna play with only a couple friends and don't want to dish out 25-30$ a month on a server.
diatanato is Russian, so sometimes a little meaning gets lost in translation. He probably didn't mean to offend.

Your issue is that for some reason you cannot communicate with your own external IP address. I'm not certain what the cause is there; if I ping mine, I get responses. If I understand correctly, the main test server is run from a home connection, and whasf can log into it. I run the server from a VM on my desktop PC, and just changed the zoneip to my external address, opened the ports in my router, and connected just fine with no additional configuration.

As to "why would you do that?"... Anything worth doing (in the trunk) is worth doing right the first time, otherwise it creates bugs that impact everyone eventually. If you want to alter your own version to operate on multiple interfaces, then by all means feel free to. If you create a bug, it affects your server only.

PS -- Yeah, I smell the hypocrisy of me saying anything worth doing... :)

User avatar
whasf
Site Admin
Posts: 1312
Joined: Thu Jul 19, 2012 9:11 pm

Re: Local network accessibility

Post by whasf » Sat Sep 15, 2012 6:22 pm

the main test server is on a VPS in Russia somewhere.. I just send them money ^^
Maybe Dia can find it and swing by and post a picture of it

--

Something about your router doesn't let you get to your DMZ/Internet IP from your internal network. If you do a Google search:
https://www.google.com/#hl=en&output=se ... 20&bih=985

you will see that this is a common problem that some routers have
--

Dia made that comment because it is generally not good pratice to run a server application and it's client application on the same machine
-- Whasf

bluekirby0
Developer
Posts: 707
Joined: Sun Jul 22, 2012 12:11 am

Re: Local network accessibility

Post by bluekirby0 » Sat Sep 15, 2012 8:35 pm

If you just want a custom patch hacked together, that is doable, but it would be your burden to apply it and maintain it when it inevitably breaks somewhere down the road. "Quick Fixes" don't really belong in the svn.

Post Reply