Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jun 2010
    Posts
    1

    Default Restrict access to a site by IP address

    This seems like a stupid question, with likely an obvious answer, but I can't find it anywhere.

    Is there a way in WHM/cPanel to limit access to one of the hosted sites by IP address? I'd prefer not to use .htaccess for various reasons, but need a site to only be accessible from a company's outbound IP address. (I realize this isn't foolproof security, but it is requested by the site owner)

    I would normally do this in the apache VirtualHost section for the site with something like:
    Code:
    Order allow,deny
    Allow from 192.168.1.0/24
    Allow from 127
    but cPanel apparently builds the httpd.conf file from other sources, and I don't know where those include files are for the individual sites.

    Also, I have the mod_security and ConfigServer ModSec plug-ins, but they seem centered on banning individual IPs for abuse. I don't see an interface to whitelist a single IP and deny all others.

    Also, I don't like using the global options I see in the mod_security plug-in because I don't want to affect any other hosted sites.

    So, the question is: What is the best practices way to restrict traffic to a single IP for a given website, without affecting any other hosted sites.

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Sep 2006
    Location
    Virginia Beach, VA
    Posts
    254
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    put those lines in the .htaccess of your site. If you want to use includes, there are include lines commented out by default in your httpd.conf. Uncomment them, create the folders they refer to, then drop a *.conf file in there with the allow rules.

  3. #3
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Jun 2004
    Posts
    313
    cPanel/Enkompass Access Level

    DataCenter Provider

    Default

    Try cPanel >> Security >> IP Deny Manager.
    NDCHost (ProVPS): Xen VPS / Dedicated / Co-Location
    Contact us for your cPanel Licensing needs! We price match, provide better support, and take care of our customers!

Similar Threads & Tags
Similar threads

  1. Restrict FTP Access
    By BuffaloWeb in forum Security
    Replies: 18
    Last Post: 08-10-2010, 06:14 PM
  2. Replies: 8
    Last Post: 06-24-2009, 06:20 PM
  3. restrict exim to one ip address
    By cyberspirit in forum cPanel and WHM Discussions
    Replies: 6
    Last Post: 01-29-2008, 06:25 PM
  4. How to restrict cPanel / FTP access to one IP address
    By techpro in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 01-07-2008, 10:26 AM
  5. urgent help- cant access site via ip address
    By ullalla in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 12-26-2006, 09:18 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube