XF 1.2 How can I create a Firewall for protection Control admin ?

Qaseem

Member
Hello
I know how to create Firewall
But I do not know the name of the folder to be laid on him the Firewall
Please indicate the name of the folder only
 
Hello
I know how to create Firewall
But I do not know the name of the folder to be laid on him the Firewall
Please indicate the name of the folder only
For password protecting it do the below. You will need to create an htaccess password file, put it in a directory that is not available to be browsed to and then use that path for the below.

In nginx, in your vhost file in the above the base Location / directive you need to place
Code:
location ~/admin\.php$ {
    allow XXX.XXX.XXX;
    deny all;.
    auth_basic "Administrator Login";
    auth_basic_user_file /path/to/your/password_file;
    root /path/to/root/forum/directory;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME
    $document_root$fastcgi_script_name;
    include /etc/nginx/fastcgi_params;
    }

In Apache2 it would be defined in your .htaccess
Code:
<Files admin.php>
    AuthType Basic
    AuthName "Protected Access"
    AuthUserFile /path/to/your/htaccess.pwd.file
    Require valid-user
Order deny, allow
Deny from all
Allow from XXX.XXX.XXX
</Files>

There is also a way to do it by IP in htaccess, but I'd have to look that up since I don't use it.

EDIT: I have placed code in both the nginx and Apache2 directives. I know that the nginx one works. I think the above Apache 2 IP stuff will work, where XXX.XXX.XXX is your IP address.
 
Last edited:
Top Bottom