-
Anti-Ddos Holograph Emulator
Well I skimmed through Zak's XZ edit or whatever, and I noticed a small patch used to stop unwanted connections and traffic against the server, so I thought for the users who didn't notice it, I'll just release it as a separate snippet.
Go to Source > Socket Servers > Game Socket Server
Then add this snippet anywhere you wish.
Code:
#region Anti-ddos
// Prevents DDOS Attacks against the server.
internal static bool ConnectionAllowed(string IP, int ID)
{
if (SecurityManagement.ConnectionBanned(IP))
return false;
int conncout = mConnectionCounter.Count(a => (a == IP));
if (conncout >= 10 || ID > mMaxConnections) //Reached connection limit
{
SecurityManagement.BanAddress(IP);
return false;
}
mConnectionCounter[ID] = IP;
Out.WriteLine("Anti-Ddos Protection: On!");
return true;
}
#endregion
It's not making it impossible to be ddosed, but it works better than nothing. :)
Credits to Martin for making
Credits to me for releasing
Press the "Like" button if you liked this release.
-
Re: Anti-Ddos Holograph Emulator
-
Re: Anti-Ddos Holograph Emulator
I love you, needed this, thanks!
-
Re: Anti-Ddos Holograph Emulator
You cannot stop a DDoS attack indefinately. Just saying. A proper DDoS (which retros do not generally get) would go at ~10gbps which would completely fuck your server as soon as the attack commences. This little snippet'll block one ip and then it'll die.
Soz bout it.
-
Re: Anti-Ddos Holograph Emulator
Jonty, your a Cat, read the bottom of the thread.
---------- Post added at 12:18 AM ---------- Previous post was at 12:17 AM ----------
and by the way I freakin love your sig
-
Re: Anti-Ddos Holograph Emulator
Thank you, anyway are you talking about my signature?
---------- Post added at 07:51 PM ---------- Previous post was at 07:48 PM ----------
Quote:
Originally Posted by
Jontycat
You cannot stop a DDoS attack indefinately. Just saying. A proper DDoS (which retros do not generally get) would go at ~10gbps which would completely fuck your server as soon as the attack commences. This little snippet'll block one ip and then it'll die.
Soz bout it.
1 is better than none.
-
Re: Anti-Ddos Holograph Emulator
Zak didn't code this, got it from a emu I sent him.
2nd time you got a code from Zak.
Code your own stuff lol.
js.
-
Re: Anti-Ddos Holograph Emulator
Quote:
Originally Posted by
Tr0ll.™
Zak didn't code this, got it from a emu I sent him.
2nd time you got a code from Zak.
Code your own stuff lol.
Your point?
-
Re: Anti-Ddos Holograph Emulator
Quote:
Originally Posted by
RockStar7
Your point?
You've given false credits twice in a row.
js
lol
-
Re: Anti-Ddos Holograph Emulator
Zak told me he created this, hence I placed him in the credits, if you feel that the credits deserved is given' to the wrongful owner, confront the wrongful owner about it, rather than flam threads with annoyance spam. That can resolve a problem, complaining to me does NOT resolve it. If you can provide me the creator and have him/her approve it, I would be more they glad to add them into the credits, otherwise do not bother.
-
Re: Anti-Ddos Holograph Emulator
i recreated the banning manager so this snippet works better ,
-
Re: Anti-Ddos Holograph Emulator
-
Re: Anti-Ddos Holograph Emulator
-
Re: Anti-Ddos Holograph Emulator
yet more shitting coding being added to a shitty coded emulator.
-
Re: Anti-Ddos Holograph Emulator
Quote:
Originally Posted by
Matthew
yet more shitting coding being added to a shitty coded emulator.
right look at it looks like it has been coding through php base
-
Re: Anti-Ddos Holograph Emulator
Quote:
Originally Posted by
Bin3000
right look at it looks like it has been coding through php base
Code:
#region Anti-ddos
// Prevents DDOS Attacks against the server.
internal static bool ConnectionAllowed(string IP, int ID)
{
if (SecurityManagement.ConnectionBanned(IP))
return false;
int conncout = mConnectionCounter.Count(a => (a == IP));
if (conncout >= 10 || ID > mMaxConnections) //Reached connection limit
{
SecurityManagement.BanAddress(IP);
return false;
}
mConnectionCounter[ID] = IP;
Out.WriteLine("Anti-Ddos Protection: On!");
return true;
}
#endregion
in what way does this look like a code from a php base.
and Matthew its from martinmine,
---------- Post added at 05:01 AM ---------- Previous post was at 05:00 AM ----------
expect for the returns since there in php, but eh ur a noob bin,
-
Re: Anti-Ddos Holograph Emulator
If there's one thing I don't understand, it's why people bother giving credit to them selves for making a thread.
-
Re: Anti-Ddos Holograph Emulator
Quote:
Originally Posted by
Mithex
and by the way I freakin love your sig
why thank you i believe it outlines my inner beauty
-pouts-
-
Re: Anti-Ddos Holograph Emulator
Quote:
Originally Posted by
RockStar7
1 is better than none.
Wouldn't this only ban the user if they were DDoS'ing / DoS'ing the server port? If so, it is pointless because 1. You can't prevent someone from DoS'ing / DDoS'ing with a ban. You would have to ban them from the actual server... and 2. No one DDoS's / DoS's the server port because it does nothing other than make the online users count go up by however many connections you flood the port with.
-
Re: Anti-Ddos Holograph Emulator
Quote:
Originally Posted by
Hejula
Wouldn't this only ban the user if they were DDoS'ing / DoS'ing the server port? If so, it is pointless because 1. You can't prevent someone from DoS'ing / DDoS'ing with a ban. You would have to ban them from the actual server... and 2. No one DDoS's / DoS's the server port because it does nothing other than make the online users count go up by however many connections you flood the port with.
Not if you're smart and code it to run off the database eg
PHP Code:
SELECT * FROM users WHERE online = '1'
return mysql_num_rows
=p
-
Re: Anti-Ddos Holograph Emulator
Quote:
Originally Posted by
Matthew
yet more shitting coding being added to a shitty coded emulator.
you dont can do it better:thumbdown:
-
Re: Anti-Ddos Holograph Emulator
Very nice, Might have to Implant this! thanks!
-
Re: Anti-Ddos Holograph Emulator
Quote:
Originally Posted by
Jontycat
Not if you're smart and code it to run off the database eg
PHP Code:
SELECT * FROM users WHERE online = '1'
return mysql_num_rows
=p
Even if you do, it won't stop the DoS / DDoS attack because it will not block all connections from the IP to the Server...
-
Re: Anti-Ddos Holograph Emulator
Quote:
Originally Posted by
davidaap
you dont can do it better:thumbdown:
I don't code in .NET languages. I'm personally taking up Python. Much more robust. C# shouldn't be used for servers. Period. I can just tell the coding is bad. It's not a direct attack at the OP but Ion is simply awful. Many people (who actually know what good coding is) will agree.
If you want to keep script kiddies from performing a DoS attack using tools that contain more spyware and will do more damage to them than what it will to do the server they're DoSing have fun with it. But coding it at application level isn't a good idea. a DoS attack should be blocked before it even reaches the game server.
-
Re: Anti-Ddos Holograph Emulator
Quote:
Originally Posted by
Matthew
I don't code in .NET languages. I'm personally taking up Python. Much more robust. C# shouldn't be used for servers. Period. I can just tell the coding is bad. It's not a direct attack at the OP but Ion is simply awful. Many people (who actually know what good coding is) will agree.
If you want to keep script kiddies from performing a DoS attack using tools that contain more spyware and will do more damage to them than what it will to do the server they're DoSing have fun with it. But coding it at application level isn't a good idea. a DoS attack should be blocked before it even reaches the game server.
you right, it think that people need to set in they config that you are only allowed to have 3 connections to the server(by ip) :thumbup: