Q&A: Disallow Access to /univention from Internet

Kudos again to @Moritz_Bunkus

Question

How can we restrict access to /univention only to local networks?

Answer

To restrict access use Apache’s internal access control and create a file name /etc/apache2/conf-available/umc-access.conf whith the following content:

<Location /univention/>
  Require ip 192.168.0.0/24 # put your local network address range here
  Require all denied
</Location>

Then enable this file and restart Apache:

a2enconf umc-access
systemctl restart apache2
3 Likes
Mastodon