Page 1 of 1

User login filter from IPs

Posted: Sat 13. Jun 2020, 19:41
by Tony20
About adding the same feature like in Admin, where admin can filter login from IPs.


The user does not have that choice, I think it make KeyHelp more secure.





Tony.

Re: User login filter from IPs

Posted: Sat 13. Jun 2020, 23:49
by george
Hi Tony, thats a good idea.

For now, you could add the following, to a .htaccess file in the KeyHelp web directory:

/home/keyhelp/www/.htaccess

Code: Select all

# RESTRICT ACCESS TO DIRECTORY BY IP ADDRESS
# Include in .htaccess of any directory
<RequireAny>
Require all denied
Require ip 1.2.3.4
Require ip 5.6.7.8/12
# If local server access to the directory is required
# add the following; include the server ip addresses (ipv4 & ipv6)
Require local
Require ip 9.10.11.12
Require ip 2001:0db8:85a3:0000:0000:8a2e:0370:7334
</RequireAny>
source: viewtopic.php?f=11&t=9261

Re: User login filter from IPs

Posted: Sun 14. Jun 2020, 17:59
by Tony20
Hello George!


When i look in /home/keyhelp/www/ there is no ".htaccess" file, so I will have to create one?

Re: User login filter from IPs

Posted: Sun 14. Jun 2020, 18:20
by Jolinar
Tony20 wrote: Sun 14. Jun 2020, 17:59 When i look in /home/keyhelp/www/ there is no ".htaccess" file, so I will have to create one?
Yes.