Using request filters in DotNetNuke to restrict website access

Have you ever had the need to blog a range of IP Addresses from accessing your website? Or perhaps, setup a website that is only accessible to a specific range of IP Addresses? DotNetNuke Request Filters are a great tool for getting such functionality configured, all configurable within your browser, without needing access to the settings in IIS.

Before configuring the request filters, I’ll throw out an example of why you might do this. If your website has a forum, or other community type interface, you have likely experienced spammers trying to take advantage of these features. Sometimes these spammers come from a specific IP Address, or even a specific range of ip addresses. If that is the case, you may want to turn off your website for those IP Addresses.

A word of warning, the instructions below are very powerful, if you aren’t careful, you could bring your website down. Read through the instructions before attempting to configure your website’s request filters.

Configuring your DotNetNuke website to be accessible from one IP Address

Here are the steps to configure request filtering for an IP Address, essentially making the website ONLY accessible to a person browsing from a computer using the defined IP address. All other addresses will redirect to DotNetNuke.com. (these instructions assume you are running on DotNetNuke 6+

  1. Login to your website with a Super User account (typically HOST).
  2. Navigate to the Host/Host Settings page.
  3. From there click on the Other Settings tab
  4. Check the Enable Request Filters checkbox image
  5. Click on Add New Rule image
  6. First we will configure the site to only be accessible from a specific IP Address (67.188.123.23). These settings configure all requests not from 67.188.123.23 to redirect to DotNetNuke.com image
  7. To SAVE your new rule, click on the disk icon to the left of the Server Variable field.
  8. If you access the site from the IP Address defined above, the site would function as normal.
  9. If you access the site from a different IP Address than the one defined above, you would be redirected to DotNetNuke.com

Configuring your DotNetNuke website to NOT be accessible from a range of IP Addresses

  1. Login to your website with a Super User account (typically HOST).
  2. Navigate to the Host/Host Settings page.
  3. From there click on the Other Settings tab
  4. Check the Enable Request Filters checkbox image
  5. Click on Add New Rule image
  6. First we will configure the site to NOT be accessible from a specific IP Address range (67.188.1.1-254). These settings configure all requests from this range to redirect to DotNetNuke.com, all other requests would access the site as normal. image
  7. To SAVE your new rule, click on the disk icon to the left of the Server Variable field.
  8. If you access the site from the IP Address in the range defined above, the site would redirect.
  9. If you access the site from a different IP Address than the range defined above, the site would function as normal.

If you are having trouble generating the proper regular expression for a Range of IP Addresses you can check out this page on Google Answers.

If you happen to screw up a rule, and make your site inaccessible, if you can access the file system (either via the server, or FTP) you can find the rules defined in the dotnetnuke.config file in the root of your website.

Be careful if you play around with request filters! They can be very powerful tools.

Comments

Chee Chiu Ng
Hi, is it possible to restrict access for the login page only?
Chee Chiu Ng Wednesday, March 12, 2014 10:46 PM (link)
cathal connolly
@Chee you can use IP filtering to block admin/host loging's for certain addresses http://www.dnnsoftware.com/help#Documentation/Using_the_Control_Panel/Host_Console/Host_Settings/Advanced_Settings/Login_IP_Filters/Login_IP_Filters.html?Highlight=ip filter
cathal connolly Thursday, March 13, 2014 12:04 PM (link)
Chris Hammond
Nice url wrap there...
Chris Hammond Thursday, March 13, 2014 12:05 PM (link)

Comment Form

Only registered users may post comments.

NewsArchives


April 2014 (4)
March 2014 (3)
February 2014 (4)
January 2014 (6)
December 2013 (6)
November 2013 (2)
October 2013 (9)
September 2013 (10)
August 2013 (8)
July 2013 (4)
June 2013 (8)
May 2013 (13)
April 2013 (2)
March 2013 (7)
February 2013 (7)
January 2013 (10)
December 2012 (6)
November 2012 (20)
October 2012 (12)
September 2012 (27)
August 2012 (29)
July 2012 (22)
June 2012 (17)
May 2012 (23)
April 2012 (24)
March 2012 (27)
February 2012 (21)
January 2012 (12)
December 2011 (18)
November 2011 (20)
October 2011 (27)
September 2011 (17)
August 2011 (18)
July 2011 (45)
June 2011 (22)
May 2011 (23)
April 2011 (19)
March 2011 (36)
February 2011 (19)
January 2011 (22)
December 2010 (29)
November 2010 (37)
October 2010 (32)
September 2010 (43)
August 2010 (46)
July 2010 (37)
June 2010 (46)
May 2010 (29)
April 2010 (38)
March 2010 (27)
February 2010 (33)
January 2010 (34)
December 2009 (13)
November 2009 (20)
October 2009 (29)
September 2009 (18)
August 2009 (29)
July 2009 (19)
June 2009 (18)
May 2009 (23)
April 2009 (16)
March 2009 (13)
February 2009 (20)
January 2009 (25)
December 2008 (25)
November 2008 (29)
October 2008 (34)
September 2008 (33)
August 2008 (36)
July 2008 (31)
June 2008 (25)
May 2008 (26)
April 2008 (33)
March 2008 (31)
February 2008 (24)
January 2008 (18)
December 2007 (27)
November 2007 (51)
October 2007 (24)
September 2007 (32)
August 2007 (24)
July 2007 (20)
June 2007 (28)
May 2007 (27)
April 2007 (24)
March 2007 (47)
February 2007 (21)
January 2007 (41)
December 2006 (21)
November 2006 (16)
October 2006 (24)
September 2006 (36)
August 2006 (30)
July 2006 (31)
June 2006 (37)
May 2006 (13)
April 2006 (13)
March 2006 (18)
February 2006 (20)
January 2006 (13)
December 2005 (6)
November 2005 (15)
October 2005 (15)
September 2005 (16)
August 2005 (7)
April 2005 (1)
March 2004 (4)
February 2004 (6)
January 2004 (1)
November 2003 (4)
October 2003 (22)
September 2003 (22)
August 2003 (15)
July 2003 (14)

Copyright 2014 by DNN Corp | Terms of Use | Privacy | Design by Parker Moore Design