Home   Help Login Register  
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

Search
WooThemes - Quality Themes, Great Support
Pages: [1]   Go Down
Print
Topic: block IP address in the server  (Read 838 times)
0 Members and 1 Guest are viewing this topic.
« on: June 24, 2009, 10:33:51 PM »
w3school Offline
Newbie

View Profile
*

iTrader: 0
Posts: 26



How can I block the IP addresses so that no one can access the server or sites from those IP addresses? I want block some IP addresses on my Red hat Linux (cPanel) box.

Thanks,

w3school
Logged
« Reply #1 on: June 24, 2009, 10:37:15 PM »
Kailash Offline
Administrator
Newbie

View Profile WWW
*****

iTrader: 50
Posts: 273



You can use one of the following Firewall on your server:

[1] ConfigServer Security and Firewall
For more details on ConfigServer Security and Firewall, visit http://www.configserver.com/cp/csf.html

[2] APF
For APF installation, you can refer http://www.webhostgear.com/61.html

Also, if you want to block the IP address for one particular site then you can do it via .htaccess file. You just need to add following directive to block the IP address:

Code:
deny from IP address

Kailash
Logged

« Reply #2 on: June 24, 2009, 10:39:03 PM »
digitalpoint Offline
Newbie

View Profile
*

iTrader: 0
Posts: 46



Can we block the IP range for particular web site using .htaccess ?

Thanks,

Digitalpoint
Logged
« Reply #3 on: June 24, 2009, 10:40:27 PM »
Kailash Offline
Administrator
Newbie

View Profile WWW
*****

iTrader: 50
Posts: 273



Can we block the IP range for particular web site using .htaccess ?
Yes, you can. Just add following line:

deny from x.x.x.x-x.x.x.x

If you want to block just on IP range, you can do it using following:

deny from 192.168

It will block the access for 192.168.0.0 to 192.168.255.255

Kailash
Logged

Pages: [1]   Go Up
Print
Jump to:  

Untitled Document
(c) 2009 HELM, WHM, cPanel, ASP, .Net development, PHP, MySQL, MSSQL Server, SEO support forum
Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC | Forum style designed by PixelSlot
Sitemap - XML Sitemap