Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForumForumHow to ban a user?How to ban a user?
Previous
 
Next
New Post
6/30/2007 10:39 AM
 

Hi,

 

I need to ban a user by IP address. Is this possible? I could not see a way to do it...

 


Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
6/30/2007 10:50 AM
 

Rodney, I don't believe it's possible in the forums module, but it can be done at the portal level since 4.3.3 via the request filter -see below (i've had to change one of the < characters to { due to a bug in the filtering)

Configure Request Filter

Each rule element in the request filter defines a simple matching expression and the action to take if a match is found. You can define as many rules as needed. This provides a flexible "or" operation where any one rule can cause the request to be blocked.

Rule Attributes:
  • servervar: This is the name of a Server variable from the Request.ServerVar hash table. See: http://www.w3schools.com/asp/coll_servervariables.asp
  • operator : Defines the operation that determines whether an actual match exists. Valid values: Regex, Equal, NotEqual
    • Regex:  Uses the regular expression specified in the value attribute to determine a match.
    • Equal:  Performs a search of the value list to determine if the value of the specified server variable is in the value list.
    • NotEqual:  Performs a search of the value list to determine if the value of the specified server variable does not exist in the value list.
  • value      : Defines the value of the servervar that triggers the rule. For a regex rule, the value should be a regular expression that used as a matching expression.
    If this is not a regex operation, then value can be a semicolon delimited list of values. For example it could include a list of IP addresses that should be blocked.
  • action     : Defines the action to take if a match occurs. Valid values: NotFound, Redirect, PermanentRedirect.
    • NotFound:  Returns a 404 status code and stops all further response processing.
    • Redirect:  Performs a standard redirect to the url specified in the location attribute.
    • PermanentRedirect:  Performs a permanent redirect (status code 301) to the url specified in the location attribute.
  • location  : The url where the request will be redirected. This can be left blank for the 'NotFound' action.
Host Settings:

Host administrators can enable and disable the Request Filter from the HostSettings screen.  This settings page also provides an editor for adding, updating and deleting rules 

Request Filter Settings

Recovering from Errors

It is important to note that it is possible to lock yourself out of the website if you misconfigure a rule.   For example if you intend to prevent an IP address from accessing the site, you might want to create a rule like the one below:

{rule servervar="REMOTE_ADDR" values="205.196.10.2" operator="Equal" action="Redirect" location="http://www.disney.com" />


Buy the new Professional DNN7: Open Source .NET CMS Platform book Amazon US
 
New Post
6/30/2007 11:10 AM
 

Thanks for that Cathal - did not realise that was possible. Unfortunately in this case I need to ban him from the Forum only - he is welcome to use the rest of the site. Anyone know if Banned Ips are in the new Forums module?


Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
6/30/2007 12:11 PM
 

OK, I'm assuming that only registered users are allowed to use (write to) the forum, and that maybe you could have one account per email address, so on that basis:

How about creating a role that everyone is automatically assigned to, say - 'forum users'. 

Add role to forum module with necessary permissions.

Add everyone via SQL. (not sure if it can be done another way)

Remove all other roles with write permissions from forum.

Remove 'forum users' role from the one member.

 
New Post
6/30/2007 4:41 PM
 

When you create a new role for the forum users with  auto assignment on i think that every user in your portal should have this role enabled in their account.

After that you should like BarryS said remove the role from user you want to ban.

Good luck,

Marc


Regards,
Marc

www.biservices.eu for free nl-NL resourcepacks.
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsForumForumHow to ban a user?How to ban a user?


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out