Jump to content

Ban/Block IP


Cydh

Recommended Posts


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

  • This command will be passed via char-server & login-server, doesn't use direct SQL query to add/remove IP
  • Atcommands:
    • @ipban <time> <ip_address>: Ban an IP
    • @ipunban <ip_address>: Unban an IP
    • @ipblock <ip_address>: Block (permanent ban) an IP
    • @ipunblock <ip_address>: Unblock an IP
  • Login-server console command:
    • ipban:list -> Listings current banned/blocked IP
    • ipban:ban <ip_address> <duration> [<netmask>] -> Ban IP
    • ipban:block <ip_address> [<netmask>] -> Block IP
    • ipban:remove <ip/network_address> -> Remove banned/blocked IP
    • ipban:clear -> Clear all banned/blocked IP
  • Use netmask to block IPs within Network range. Only for console command, default netmask for @command decided in login_athena.conf, ipban_netmask.
  • Permanent ban (Blocked IP/Network) will results notification "Rejected from server(3)" on player login and show error allow/deny bla bla (just like before).
  • Temporary ban (by @ipban or consol ipban:ban) will results notification "Your are Prohibited to log in until DATE-UNTIL-THIS-IP-UNBANNED".
  • Temporary ban because of Password Failure, will makes "Rejected from server(3)" (just like before) and record won't be saved when server is restarted.
  • If there's new banned/blocked IP, login-server will asks char-server to disconnect players with matching IP (or Network ID)

 

NOTE:

  • Don't forget to import 2 sql files. ipbanlist_upd.sql to update `ibanlist` table in database that used for login-server and ipbanlist_log_upd.sql to create new table for IP Ban log `ibanlist_log` in database that used for log database
  • Maybe still some stuffs that need to be optimized and cleaned.
  • NOTE: Don't be scammed by the file name /gg

Scrennies:

post-5421-0-38989300-1418915850_thumb.pngpost-5421-0-96492300-1418915936_thumb.pngpost-5421-0-96492300-1418915936_thumb.png

post-5421-0-65506100-1418915860_thumb.pngpost-5421-0-37806200-1418915872_thumb.pngpost-5421-0-82828400-1418915874_thumb.png

 

Download: @ipban_3.0.1-rA-20150914-d1f94700.diff

[spoiler=old releases]@ipban_3.0.diff

  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

Nice released!

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

Almost feel this should be part of rA with an MACRO on/off flag.

Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

Almost feel this should be part of rA with an MACRO on/off flag.

too many bureaucracies to add something when noone around. put it here, people goes to implement & test it. it's better than put on branch with NULL tester /heh

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  737
  • Reputation:   216
  • Joined:  11/29/11
  • Last Seen:  

sad but true.

We need to work on automated tested, so at least we weel be confident when pushing something

Link to comment
Share on other sites

  • 8 months later...

  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

Added diff for d1f94700 (20150914)

Link to comment
Share on other sites

  • 3 months later...

  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  1096
  • Reputation:   344
  • Joined:  02/26/12
  • Last Seen:  

@Cydh

I was found a lot of different bugs, and warnings inside this system.

Some of bugs reported below i was manually fix.

 

  1. Imposible to compile because of missing #include defines under linux, at windows this mod you can compile without errors or problems
  2. I was review code, and i found for a lot of missing scopes, or wrong typo, (check examples below)
  3. I was found a lot of not used variable / structures (or there is a logic typo)
  4. Btw, i was make it work a little bit, but when you @ipblock or @ipban character -> he did't kicked from the game, you need manually kick him / her from the game to apply ban (after kick, he can't connect)
  5. A lot of problems with sql tables from the start.

 

Suggestions

  1. Please Fix bugs with this system (there are a lot of them, and check & review your code, (because for now this application is very dangerous for production))
  2. Please add separate diff for code, and separate sql tables which we need to add to the game (with diff for ready tables, and with how tables must looks like (to make easy it to isntall)
  3. Test it on linux, you will find a lot of strange things with this system.

 

THank you!

Edited by Anacondaqq
Link to comment
Share on other sites

  • 6 months later...

  • Group:  Members
  • Topic Count:  36
  • Topics Per Day:  0.01
  • Content Count:  383
  • Reputation:   121
  • Joined:  03/31/12
  • Last Seen:  

Cydh, can you update this as Anacodaqq suggestion.
Looking forward on this src modification.

Link to comment
Share on other sites

  • 1 year later...

  • Group:  Members
  • Topic Count:  22
  • Topics Per Day:  0.00
  • Content Count:  235
  • Reputation:   55
  • Joined:  12/02/11
  • Last Seen:  

On 12/17/2015 at 7:16 AM, Anacondaqq said:

@Cydh

I was found a lot of different bugs, and warnings inside this system.

Some of bugs reported below i was manually fix.

 

  1. Imposible to compile because of missing #include defines under linux, at windows this mod you can compile without errors or problems
  2. I was review code, and i found for a lot of missing scopes, or wrong typo, (check examples below)
  3. I was found a lot of not used variable / structures (or there is a logic typo)
  4. Btw, i was make it work a little bit, but when you @ipblock or @ipban character -> he did't kicked from the game, you need manually kick him / her from the game to apply ban (after kick, he can't connect)
  5. A lot of problems with sql tables from the start.

 

Suggestions

  1. Please Fix bugs with this system (there are a lot of them, and check & review your code, (because for now this application is very dangerous for production))
  2. Please add separate diff for code, and separate sql tables which we need to add to the game (with diff for ready tables, and with how tables must looks like (to make easy it to isntall)
  3. Test it on linux, you will find a lot of strange things with this system.

 

THank you!

If you don't mind? would you share the working copy you have? I mean the one you mentioned above?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...