phpsysinfo / phpsysinfo

phpSysInfo: a customizable PHP script that displays information about your system nicely
http://phpsysinfo.github.io/phpsysinfo
GNU General Public License v2.0
1.38k stars 233 forks source link

List of IP addresses (IPv6) of clients authorized to run? #390

Open pgmr2 opened 6 months ago

pgmr2 commented 6 months ago

Is it possible to authorize IPv6 in the ini file client?.

namiltd commented 6 months ago

Currently no, but you can do it using the .htaccess file.

For Apache 2.2:

Order Allow,Deny
Deny from all
Allow from 111.111.111.111
Allow from 222.222.222.222
Allow from 2001:db0:1:2::/64

For Apache 2.4+:

<RequireAll>
    Require all denied
    Require ip 111.111.111.111
    Require ip 222.222.222.222
    Require ip 2001:db0:1:2::/64
</RequireAll>
pgmr2 commented 6 months ago

Am 9. November 2023 08:55:32 MEZ schrieb namiltd @.***>:

DENY ACCESS TO IP ADDRESS

Currently no, but you can do it using the .htaccess file

Apache 2.2

Order Allow,Deny
Deny from all
Allow from 111.111.111.111
Allow from 222.222.222.222
Allow from 2001:db8:2:1::/64

Apache 2.4+

<RequireAll>
   Require all denied
   Require ip 111.111.111.111
   Require ip 222.222.222.222
   Require ip 2001:db8:2:1::/64
</RequireAll>

-- Reply to this email directly or view it on GitHub: https://github.com/phpsysinfo/phpsysinfo/issues/390#issuecomment-1803320719 You are receiving this because you authored the thread.

Message ID: @.***> Hello, I don't use a Apache web server. my web server is Nginx. Do You have a solution for Nginx? greatings pgmr2 Gruß Reinhard Fiebelkorn

namiltd commented 6 months ago

Try something like this in the file /etc/nginx/nginx.conf


location / {
   allow 111.111.111.111;
   allow 222.222.222.222;
   allow 2001:db8:2:1::/64;
   deny all;
}