Forum rules


Before adding a bug or feature request please check it is not already in the bug tracker or answered in the FAQ.



autodetect ip

Post new topic Reply to topic  [ 14 posts ] 
Author Message
 Post subject: autodetect ip
PostPosted: Wed Oct 27, 2010 4:13 pm 
User avatar
Obliterated

Current Scorched3D Rank: Unranked



Joined: Wed Jun 14, 2006 11:18 pm
Posts: 1517
Location: United Kingdom
"2010-10-21 23:38:11 r421 scara Finished UPnP support to automatically add port mappings when running server"

nice change. any way to fix the autodetect ip thing to go with that? i cant add this straight to the bugs list - i havent researched what's causing it. im a bit vague. autodetect has never worked for me.

could we have some kind of web page to report the client IP and maybe test for open ports/sockets for people who dont use upnp?

$client = "udp://1.2.3.4";
fsockopen($client, $port, $errorno, $errorstring);
or something. couple of little green light graphics if all is working.

i have an old java class for detecting local side ip somewhere. i could dig it out to go with. maybe even do a reverse dns, parse the agent string to report OS and browser and hook it up to a whois to report the country. could get some extra site traffic from it. happy to put something together if wanted. wouldnt be much more than a copy/paste job.

ps:
website has been 99% ready for ages. i have a load of notes stored in a word doc. i seem to be adding to the list more than im ticking off. must make the transfer! i'll make a post on the thread soon as poss.


Top
 Profile  
 
 Post subject: Re: autodetect ip
PostPosted: Thu Oct 28, 2010 4:17 am 
User avatar
Obliterated

Current Scorched3D Rank: Unranked






Joined: Sat Nov 05, 2005 9:29 am
Posts: 1958
Location: In a Rental.
The autodetect can't work for everyone anyway. Some are behind routers,
Router-based ISP's, and some OS"s seem to want to hide them..

I personally use my DNS name, which is resolved on Gavin's end for tracking
purposes. On the side, it might be fun to see DNS names in place of IP's
on the server list. It's happened now and then when systems hiccup'd
Scorched3D Mod-Servers
Forum
Stats
Mods-Page


Top
 Profile  
 
 Post subject: Re: autodetect ip
PostPosted: Thu Oct 28, 2010 7:00 am 
User avatar
Obliterated

Current Scorched3D Rank: Unranked



Joined: Wed Jun 14, 2006 11:18 pm
Posts: 1517
Location: United Kingdom
yeap. dynamic dns and a domain name? nice way to do it.

do we really need to set an ip for playing over the internet? i imagine we could just have a [LAN] tickbox, and if it's not ticked, the ip box and other internet options get greyed out? seems like the registration servers would always have the ip of the server that's connecting to register.


Top
 Profile  
 
 Post subject: Re: autodetect ip
PostPosted: Thu Oct 28, 2010 9:51 am 
User avatar
Obliterated

Current Scorched3D Rank: Unranked



Joined: Wed Jun 14, 2006 11:18 pm
Posts: 1517
Location: United Kingdom
Laptops Daddy wrote:
blah blah blah. copy/paste job etc etc

here. thought i may as well go ahead. just for fun:
http://fileanchor.co.uk/scorched3d/serv ... ertest.php

Attachment:
servertest.zip [3.39 KiB]
Downloaded 132 times


i didnt bother with the whois. seemed a bit hacky


Top
 Profile  
 
 Post subject: Re: autodetect ip
PostPosted: Thu Oct 28, 2010 3:07 pm 
User avatar
Obliterated

Current Scorched3D Rank: Unranked






Joined: Sat Nov 05, 2005 9:29 am
Posts: 1958
Location: In a Rental.
Laptops Daddy wrote:
yeap. dynamic dns and a domain name? nice way to do it.

do we really need to set an ip for playing over the internet? i imagine we
could just have a [LAN] tickbox, and if it's not ticked, the ip box and other
internet options get greyed out? seems like the registration servers would
always have the ip of the server that's connecting to register.


True, LAN play wouldn't need a specified IP unless they have Stats set up.

The inserted IP in internet mode serves as a second function as well.
When initializing the Stats ID for a player, the system uses that slot's
contents as a lable on the clients ids.xml file to match up the id-key.
If the hosting server has a dynamic ip, it would reset that players stats
to zero any time our ip's changed. Gavin, Panther, and I use the DNS name
to prevent this from happening. (check your own ids.xml file to see)
That is why you cannot host stats at all if you use AutoDetect in that slot.
Scorched3D Mod-Servers
Forum
Stats
Mods-Page


Top
 Profile  
 
 Post subject: Re: autodetect ip
PostPosted: Thu Oct 28, 2010 4:02 pm 
User avatar
Obliterated

Current Scorched3D Rank: Unranked



Joined: Wed Jun 14, 2006 11:18 pm
Posts: 1517
Location: United Kingdom
Thrax wrote:
True, LAN play wouldn't need a specified IP unless they have Stats set up.

internet play wouldnt, was the point i was making, because we're always connecting to third party servers to register. (therefore game server internet side ip is ready for the taking). good point on the id files. remember that team tournament? i had to take over the hosting for a bit without losing the stats. wouldnt have been able to do that if the ids were tied to an ip.

what d'you think? could there be some way to link up the ids other than with the ip or domain name? the server name would probably be enough with some trickery to prevent fakes. i bet we could remove the need for dynamic dns and an ip address field completely if we wanted to. so many people have trouble getting the servers to work. be nice to make things as easy as possible for people.


Top
 Profile  
 
 Post subject: Re: autodetect ip
PostPosted: Fri Oct 29, 2010 5:28 am 
User avatar
Obliterated

Current Scorched3D Rank: Unranked






Joined: Sat Nov 05, 2005 9:29 am
Posts: 1958
Location: In a Rental.
Id keys and SUI are linked to the servers 'ident', the players IP, and the
players MAC address. The current methods all work together to keep players
sorted and controllable. We still need those 3 parts in place or it'll become
difficult to retain stats and player moderating actions.

It was rather annoying when they could bypass a ban simply by
changing ip and id-key.

LAN serving needs less identity management unless Stats are involved.
Internet needs them all in order to work properly. Just linking to the servers
name wouldn't be enough.

As for those having troubles with Serving.. It's mostly due to scrambled
information in the Doc's. Those with a strong enough need to host an
internet server usually dig and test untill it works, but it could take less
digging if we explained it a little more clearly.

-A clear path to the internet.(ISP's often block ports on thier ends)

-Correct IP address to reach you, not a router defined local lan address.
Enter IP / DNS-Name into the designated slot instead of AutoDetect.

-Open ports in Router Forwarding, and Firewalls.
Port 80 for tracker polls, Server Port number in TCP, Server Port number +1 in
TCP and/or UDP (need this clarified.. I just did both)

- Specify server is destined for All Internet Users.

- Allow same IP, but block same Unique-ID. Allows lan-access groups like
POM/Ellie to play.

- Stats are optional, don't obsess over making them work untill the server is
playable. Those are defined in another Doc's segment.

- Turn on Server Logs to help you find where and why it fails.

Anything else you can think of? i've been doing them so long, it's possible
i've forgotten something i did years back...
Scorched3D Mod-Servers
Forum
Stats
Mods-Page


Top
 Profile  
 
 Post subject: Re: autodetect ip
PostPosted: Fri Oct 29, 2010 6:50 am 
User avatar
Obliterated

Current Scorched3D Rank: Unranked



Joined: Wed Jun 14, 2006 11:18 pm
Posts: 1517
Location: United Kingdom
im not with you on why you think the published ip/domain name wouldnt be as well covered by something a little more arbitrary for linking up player id files. itd remove the need for dynamic dns and a domain name for people whose ip's won't stay still. i dont know about the docs. the wiki looked up to date last time i looked. tcp and udp+1

i dont want to double up. my fault for overcomplicating this. we could probably lose the published ip field in the server dialogue and make autodetect work instead. just throwing it out there.

makes little difference to me for my own purposes. i have a couple of statics and i cant use the gui anyway (ssh)


Top
 Profile  
 
 Post subject: Re: autodetect ip
PostPosted: Fri Oct 29, 2010 3:37 pm 
User avatar
Obliterated

Current Scorched3D Rank: Unranked



Joined: Mon Jun 22, 2009 6:26 pm
Posts: 1689
Location: South Dakota
oh my...
my brain..just exploded.. er
ill be right back. :mrgreen:

I still cant figure out how to setup a server, I wish It was simple, just the click of a button, but.. not all things in life are simple. *sigh
](*,)
Kanga
[AWE Development Tracker]
[AWE Companion Guide]
[AWE Home & News]
Image


Top
 Profile  
 
 Post subject: Re: autodetect ip
PostPosted: Fri Oct 29, 2010 4:26 pm 
User avatar
Obliterated

Current Scorched3D Rank: Unranked






Joined: Sat Nov 05, 2005 9:29 am
Posts: 1958
Location: In a Rental.
Kangabunny wrote:
oh my...
my brain..just exploded.. er
ill be right back. :mrgreen:

I still cant figure out how to setup a server, I wish It was simple, just the click of a button, but.. not all things in life are simple. *sigh
](*,)
Kanga


The reasons you can't create a server Kanga, are the first 3 of the things i
listed. You are pretty constricted on the ISP and system you are working
from.

The engine is doing it's job.. it just can't get out :D
Scorched3D Mod-Servers
Forum
Stats
Mods-Page


Top
 Profile  
 
 Post subject: Re: autodetect ip
PostPosted: Fri Oct 29, 2010 4:40 pm 
User avatar
Obliterated

Current Scorched3D Rank: Unranked



Joined: Wed Jun 14, 2006 11:18 pm
Posts: 1517
Location: United Kingdom
kanga

test out the page i made http://fileanchor.co.uk/scorched3d/serv ... ertest.php

that's why i made it. if you dont get green lights while the server is running, you have a ports problem. tcp 27270(say) and udp 27271. (ie your port number + 1). if theyre green and it still doesnt work, something else is up.

ive not had anyone else test it. be nice to know if it works.


Top
 Profile  
 
 Post subject: Re: autodetect ip
PostPosted: Fri Oct 29, 2010 4:55 pm 
User avatar
Obliterated

Current Scorched3D Rank: Unranked






Joined: Sat Nov 05, 2005 9:29 am
Posts: 1958
Location: In a Rental.
Laptops Daddy wrote:
kanga

test out the page i made http://fileanchor.co.uk/scorched3d/serv ... ertest.php

that's why i made it. if you dont get green lights while the server is running, you have a ports problem. tcp 27270(say) and udp 27271. (ie your port number + 1). if theyre green and it still doesnt work, something else is up.

ive not had anyone else test it. be nice to know if it works.



Yes, it works fine if all pathway's are clear.

If it were able to tie into the server lists, it could show servers open, or
display why they may not.
Scorched3D Mod-Servers
Forum
Stats
Mods-Page


Top
 Profile  
 
 Post subject: Re: autodetect ip
PostPosted: Fri Oct 29, 2010 5:12 pm 
User avatar
Obliterated

Current Scorched3D Rank: Unranked



Joined: Wed Jun 14, 2006 11:18 pm
Posts: 1517
Location: United Kingdom
cool. ty. the servers page could use some work all round, i think. (just so far as the layout and graphics). i dont mind taking that on. dont know how final the current chat system is.

i dont know if wed want the site to be able to connect to or probe active servers (other than the player/host's own for tests). maybe better for gavin to build something into the game/registration stuff. tie in a red light 'fault' graphic or something, perhaps.


Top
 Profile  
 
 Post subject: Re: autodetect ip
PostPosted: Sat Oct 30, 2010 4:47 am 

Current Scorched3D Rank: Unranked



Joined: Sat Sep 18, 2010 6:08 pm
Posts: 1
Location: Eastern US
Laptops Daddy wrote:
kanga

test out the page i made http://fileanchor.co.uk/scorched3d/serv ... ertest.php

that's why i made it. if you dont get green lights while the server is running, you have a ports problem. tcp 27270(say) and udp 27271. (ie your port number + 1). if theyre green and it still doesnt work, something else is up.

ive not had anyone else test it. be nice to know if it works.


I used a page similar to Laptop Daddy's to test earlier to get a test server running
and it saved me a lot of time.

Kanga,
If I can throw a suggestion out there from what I learned last week... I went straight to the router to open ports, but there could be a few other points of constriction sometimes overlooked... windows software firewall... antivirus/antimalware security software settings, etc. I turned my linux firewall settings off, the router should be secure enough.

Also, even after I added the ports/pinholes on my router, I found out later there was a separate settings page on the router with override options still blocking my ports... something like....
LANlocked (No Outside Access),
SilentRunning (No Open Ports, No Ping Response), and
ClearSailing(Okay, Use Custom Port Settings).

As Thrax was saying, Its usually not a game engine problem...
(BTW, I can confirm that the +1 port only needs UDP protocol open.)

For newbies to servers like me, Autodetect IP worked fine to get me on for the in-game list and allow others to join. The benefit of putting my public IP in and restarting was so my server could be seen on the spiffy website server list :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © phpBB Group