This can be done by modifying /etc/apache2/sites-available/plinth.conf
, and adding the following section within <Location /plinth>
:
## Allow traffic only from private networks
<RequireAny>
## IPv4 local addresses
Require ip 127.0.0.0/8
## IPv4 link local addresses
Require ip 169.254.0.0/16
## IPv4 class A private addresses
Require ip 10.0.0.0/8
## IPv4 class B private addresses
Require ip 172.16.0.0/12
## IPv4 class C private addresses
Require ip 192.168.0.0/16
## IPv6 local address
Require ip ::1
## IPv6 link local addresses
Require ip fe80::/10
## IPv6 private addresses
Require ip fc00::/7
</RequireAny>
And then reloading the apache2 service.