Divi WordPress Theme

Topic: block IP address in the server  (Read 8512 times)

Offline w3school

  • New Member
  • *
  • Posts: 26
  • iTrader: +0/-0
    • View Profile
block IP address in the server
« on: June 25, 2009, 11:03:51 AM »
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
VPS Hosting - AccuWebHosting

Offline Kailash

  • Web Hosting Master
  • *****
  • Administrator
  • Posts: 604
  • iTrader: +153/-0
    • View Profile
Re: block IP address in the server - Linux server
« Reply #1 on: June 25, 2009, 11:07:15 AM »
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: [Select]
deny from IP address
Kailash

Offline digitalpoint

  • New Member
  • *
  • Posts: 45
  • iTrader: +0/-0
    • View Profile
Re: block IP address in the server
« Reply #2 on: June 25, 2009, 11:09:03 AM »
Can we block the IP range for particular web site using .htaccess ?

Thanks,

Digitalpoint

Offline Kailash

  • Web Hosting Master
  • *****
  • Administrator
  • Posts: 604
  • iTrader: +153/-0
    • View Profile
Re: block IP address in the server
« Reply #3 on: June 25, 2009, 11:10:27 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

Offline brainpulse

  • New Member
  • *
  • Posts: 14
  • iTrader: +0/-0
  • Web Hosting In India
    • View Profile
Re: block IP address in the server
« Reply #4 on: September 15, 2010, 04:18:02 PM »
Interesting solution via .htaccess,

thanks kailash

Divi WordPress Theme
Tags: