Divi WordPress Theme

block IP address in the server

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

Offline w3school

  • New Member
  • *
  • Posts: 25
  • 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: 660
  • 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: 660
  • 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

Shopify Divi WordPress Theme
Tags:

Block domains in Smartermail

Started by AnonymousBoard Email Management Software & Email Clients

Replies: 1
Views: 5186
Last post July 05, 2007, 09:49:11 AM
by Kailash
Block unwanted users from your site using .htaccess

Started by ChrisBoard Hosting Security and Technology

Replies: 4
Views: 2569
Last post September 06, 2021, 07:45:00 PM
by kumkum
Block for spam when sending out notifications in the catalog

Started by ChrisBoard WordPress Support

Replies: 0
Views: 1554
Last post October 30, 2019, 04:42:07 PM
by Chris