Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,221 of 9,224 pages
About the help in other languages
All help pages

Restrict the administration by network

Step by step - limit the administration siteaccess of an Exponential site to your office network or VPN with Apache Require ip or nginx allow/deny, after giving it its own host name, and check from outside.

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/government/tasks/compliance/restrict-the-administration-by-network.md

On this page

Restrict the administration by network

For administrators and hosting teams. The public does not need to reach the administration. Limiting it to your network removes most password guessing from the internet (Separating the administration).

Contents

  1. Before you start
  2. Steps
  3. Check that it worked
  4. If something goes wrong
  5. Related pages

Before you start

  • The administration has its own host name (for example admin.example.gov, matched by [SiteAccessSettings] HostMatchType); restricting /admin below the public host is harder to get right.
  • The address ranges of your offices and VPN; remote staff without VPN need another way (VPN, or request-shield's browser check instead of a network rule).
  • A way back in if you lock yourself out (console access to the server).

Steps

Apache, on the administration's virtual host:

<Location />
    Require ip 203.0.113.0/24 2001:db8::/48
</Location>

nginx, in the administration's server block:

allow 203.0.113.0/24;
allow 2001:db8::/48;
deny all;

Velocity has no HTTP authentication or address rules for this; use the firewall, a VPN, a reverse proxy in front, or a separate Velocity bound to an internal address (13.5).

Reload the web server.

Check that it worked

curl -s -o /dev/null -w '%{http_code}\n' https://admin.example.gov/user/login

From a mobile connection (outside the ranges): 403 or no connection. From the office: 200.

If something goes wrong

  • Behind a proxy, the web server sees the proxy's address: restrict at the proxy, or use the forwarded address only from trusted proxies (Apache mod_remoteip, nginx realip).
  • Locked out: restore the previous configuration from the server console.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x