• Welcome to Web Hosting Community Forum for Webmasters - Web hosting Forum.
 

Recommended Providers

Fully Managed WordPress Hosting
lc_banner_leadgen_3
Fully Managed WordPress Hosting

WordPress Theme

Divi WordPress Theme
WPZOOM

Forum Membership

Forum Membership

block IP address in the server

Started by w3school, June 25, 2009, 11:03:51 AM

w3school

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

Kailash

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:

deny from IP address

Kailash

digitalpoint

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

Thanks,

Digitalpoint

Kailash

Quote from: digitalpoint on June 25, 2009, 11:09:03 AM
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

brainpulse

Interesting solution via .htaccess,

thanks kailash