Advertisement:

Author Topic: [TIP/TRICK] Having Problems With Banned Members?  (Read 32058 times)

Offline Ninja ZX-10RR

  • SMF Hero
  • ******
  • Posts: 2,135
  • Gender: Male
  • Sniper Legends
    • Flavio93Zena on Facebook
    • Virtual Interactive Games Entertainment Forum
Re: [TIP/TRICK] Having Problems With Banned Members?
« Reply #20 on: June 18, 2014, 09:03:10 AM »
This is a very old topic and I see it has been approved but it's terribly wrong.
Let me explain you why:

Code: [Select]
order deny,allow
deny from xx.xx.xx.xxx
deny from xx.xx.xx.xxx
deny from xx.xx.xx.xxx
deny from xx.xx.xx.xxx
allow from all

It sets the server:
  • in default "allow" mode so that any unrecognized user is automatically allowed.
  • it processes bans first and allowed entries after that.
What does it mean? It means that if allow command is processed after the deny one if you write allow from all that allow command *will* overwrite all deny entries so it will unban all users.
For reference:
http://www.simplemachines.org/community/index.php?topic=523720.0 (my first topic about it)
http://www.simplemachines.org/community/index.php?topic=523925.0 (second topic very similar to the first one and somehow used as a part 2 for the 1st one)
Thanks to Lou69 I provide also these links: http://httpd.apache.org/docs/2.2/mod/mod_authz_host.html#order and http://httpd.apache.org/docs/current/mod/mod_access_compat.html#allow

Sooo after all the overall correct setting would be (using deny,allow)
Code: [Select]
order deny,allow
deny from xx.xx.xx.xxx
deny from xx.xx.xx.xxx
deny from xx.xx.xx.xxx
deny from xx.xx.xx.xxx

Without the allow from all at the end or either use order allow,deny
Code: [Select]
order allow,deny
deny from xx.xx.xx.xxx
deny from xx.xx.xx.xxx
deny from xx.xx.xx.xxx
deny from xx.xx.xx.xxx
allow from all

In this case allow from all is necessary because the server default state is set on deny so any unlisted entries would be denied access.


I made a whole guide about this that is correct: http://www.simplemachines.org/community/index.php?topic=524146.0
« Last Edit: June 25, 2014, 04:23:08 PM by Flavio93Zena »
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.
♥ Jess ♥

STOP EDITING MY PROFILE