Restrict access

Discussion in 'General' started by orasis, Nov 4, 2013.

  1. orasis

    orasis Member

    Hello,
    using ISPConfig 3 / Debian Wheezy

    I would like to restrict access to some areas and I would like to know if it is possible without closing the ports from the firewall. Example:

    > Restrict FTP Access to specific IP(s)
    > Deny web ftp access (I am not sure if this is even possible)
    > Restrict Access to Stats to specific IP(s)
    > Restrict access to ISPconfig Control panel to specific IP(s)

    I would like to allow access only from 127.0.0.1 to the above.
    I have managed to do this to phpmyadmin and squirrelmail

    Thanks for your help in advance, and congrats for the great job
    cheers !
     
  2. orasis

    orasis Member

    I haven't found a solution yet although I am still searching all the web.

    But I found this on this thread:

    www.howtoforge.com/forums/showthread.php?t=58315

    Any hint how to add such a rule in the apache conf please ?

    thanks
     
  3. orasis

    orasis Member

    this works:
    Code:
    nano /usr/local/ispconfig/interface/web/.htaccess
    
        order deny,allow
        deny from all
        allow from 192.168.1.220
    
    this doesn't:
    Code:
    nano /etc/apache2/apache2.conf
    <Directory /usr/local/ispconfig/interface/web>
        order deny,allow
        deny from all
        allow from 192.168.1.220
    </Directory>
    
    this doesn't:
    Code:
    nano /etc/apache2/conf.d/security
    <Directory /usr/local/ispconfig/interface/web>
        order deny,allow
        deny from all
        allow from 192.168.1.220
    </Directory>
    
    I am trying to avoid 2 things:
    1. avoid using .htaccess once I can edit the apache conf directly.
    2. avoid editing ispconfig areas so that updates won't wipe my edits.

    Any help appreciated.
     
  4. 30uke

    30uke Active Member

    I like this trick:
    [file: .htaccess]
    Code:
    ErrorDocument 403 https://www.startpage.com/
    <RequireAll>
        Require ip w.x.y.z
    </RequireAll>
    Where "w.x.y.z" is your IP address. You can add more (separate IP addresses with a white space).
    This will "redirect" any request to startpage.com (haha) :)
     
  5. recin

    recin Active Member

    Try fail2ban
     

Share This Page