stubert Posted April 24, 2006 Share Posted April 24, 2006 seems someone has been spamming and or dos attacking the ja+ servers. read on for an explanation i investigated this, heres what i turned up looking at the lucasform boards, ensi has "urban combat q4" in his sig i googled it and found this thread ensi is talking in http://www.quakesrc.org/forums/viewtopic.php?t=5374&start=195&sid=c9fc25d3866b2295dcc20cb4098a89cd and theres a link in there that leads here http://aluigi.altervista.org/fakep.htm which has the dos attacks like the ones that have been going on with ja+ search the page for jedi academy case: closed Link to comment Share on other sites More sharing options...
slider Posted April 24, 2006 Share Posted April 24, 2006 THe title of the topic you started is quite strange. recent attacks on ja+ servers i don't undersant why you seem to imply that this problem is dedicated to JA+ server? if i consider the personal attack you made against JA+ in the past, i would say that you try to wildspread wrong informations about JA+. I am not surprised about your behaviour... this is tipically yours when you are speaking about JA+. this problem is dedicated to all games based on quake3 engine... Moreover to fight against this problem , JA+ is probably the more secure mod for jedi academy ... Indeed i fixed this problem since a very long time in JA+ 2.4 beta1 ... Too bad not all servers update.. And at the moment and until today, i don't know any mods that fix it except JA+. Link to comment Share on other sites More sharing options...
ensiform Posted April 24, 2006 Share Posted April 24, 2006 your accusing me of attacking servers? i think not. if not here, you did in refresh the other night. Link to comment Share on other sites More sharing options...
Tinny Posted April 25, 2006 Share Posted April 25, 2006 Ah, its alright guys, there's just been some misunderstandings going on. Slider, how do we fix this in our mods? Link to comment Share on other sites More sharing options...
ensiform Posted April 25, 2006 Share Posted April 25, 2006 you basically have a cvar where you allow x number of connections per ip (you will have to fix the IP part of userinfo first though. you cant get the players ip from userinfo after clientconnect) Link to comment Share on other sites More sharing options...
Andan Posted April 25, 2006 Share Posted April 25, 2006 Would Slider or EnsiForm be able to provide the basic (or complete) code for the limitations on x number of connections per ip addy? Link to comment Share on other sites More sharing options...
ensiform Posted April 30, 2006 Share Posted April 30, 2006 hmmm well im working on a replica sort of to make it work, its not perfect yet but when i get it i can. note though its based off of my clientSession changed and having a better storage of the IP on first connect. Link to comment Share on other sites More sharing options...
ck-killa Posted May 1, 2006 Share Posted May 1, 2006 hmmm well im working on a replica sort of to make it work, its not perfect yet but when i get it i can. note though its based off of my clientSession changed and having a better storage of the IP on first connect. I need this fix too. If you could share it when its done, that would be great. Link to comment Share on other sites More sharing options...
razorace Posted May 1, 2006 Share Posted May 1, 2006 So, why does this cause a crash? Won't the server just fill up and deny any additional clones into the game? Link to comment Share on other sites More sharing options...
ensiform Posted May 1, 2006 Share Posted May 1, 2006 Well for the Fixed up session and IP storing you would start off by doing this: http://www.lucasforums.com/showpost.php?p=1995841&postcount=4 now for the core part of the fix for dos: i assume you know how to make server cvars so make sv_maxConnections, default it to 2. now just stick this somewhere like in g_client.c or g_svcmds.c or some place like that: qboolean G_CheckMaxConnections( char *from ) { // returns qfalse when # of players on this ip is <= sv_maxConnections or dont care to check int i=0,n=0,idnum,count=1; char from2[16]; gentity_t *cl_ent; if ( !sv_maxConnections.integer ) { // not on return qfalse; } Q_strncpyz(from2, from, sizeof(from2)); n=0; while(++n<strlen(from2))if(from2[n]==':')from2[n]=0;// stip port off of "from" if ( !Q_stricmp(from2, "localhost" ) ) { // localhost doesnt matter return qfalse; } if ( !Q_stricmp(from2, "" ) ) { // bots dont matter either return qfalse; } for(i=0; i<level.numConnectedClients; i++) { idnum = level.sortedSlots[i]; cl_ent = g_entities + idnum; if ( Q_stricmp(from2, cl_ent->client->sess.IPstring ) ) // ips are not same so dont count continue; count++; } if ( count > sv_maxConnections.integer ) { return qtrue; } return qfalse; } now you may go into g_client.c in ClientConnect here is how my beginning part of ClientConnect looks: qboolean G_CheckMaxConnections( char *from ); char *ClientConnect( int clientNum, qboolean firstTime, qboolean isBot ) { char *value, *name, *oname, tmpIP[16]; int i; // char *areabits; gclient_t *client; char userinfo[MAX_INFO_STRING]; char reason[MAX_STRING_CHARS] = ""; gentity_t *ent; gentity_t *te; char fkntmpstr[30]; ent = &g_entities[ clientNum ]; trap_GetUserinfo( clientNum, userinfo, sizeof( userinfo ) ); // check to see if they are on the banned IP list Q_strncpyz(tmpIP, Info_ValueForKey (userinfo, "ip"),sizeof(tmpIP) ); if ( G_FilterIPBanPacket( tmpIP ) ) { return "You are banned from this server."; //ensiform - changed message } if ( firstTime && G_CheckMaxConnections( tmpIP ) ) { return va("Maximum Connections Per IP: %d.", sv_maxConnections.integer ); } if there is any confusion on how this works or if u get an error just say so and i will try and help ya when i can. Link to comment Share on other sites More sharing options...
Emiel Regis Posted May 10, 2006 Share Posted May 10, 2006 idnum = level.sortedSlots; cl_ent = g_entities + idnum; Sorry, but I'm lost - what's sortedSlots O_o? Link to comment Share on other sites More sharing options...
ensiform Posted May 10, 2006 Share Posted May 10, 2006 thats just my soredClients list thats sorted by client number only. i think replace that with sortedClients and you will b good. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.