I have created a WordPress site for our company intranet. I also created a subdomain called intranet.example.com. Is it possible to make this subdomain only accessible from our local network?
If not, could I host the site on a local computer and simply point the DNS of the intranet.example.com to the IP of the local computer?
-
1https://en.wikipedia.org/wiki/Split-horizon_DNS (or just your normal DNS with an internal IP in the DNS record for `intranet.example.com`) – ceejayoz Mar 26 '19 at 18:02
-
Yes, that "local computer" idea isn't bad. Much better than split-horizon DNS anyway. If Wordpress is cloud-based, how about a VPN? – kubanczyk Mar 26 '19 at 22:35
2 Answers
You can configure your web server to accept connections (to this subdomain) from only specific IP addresses/networks. Other IP addresses will see only 403 Forbidden. How you do that depends on which web server you chose to use (but you didn't tell us this important information). Consult its documentation.
![](../../users/profiles/126632.webp)
- 237,123
- 42
- 477
- 940
If you are already running a DNS resolver or forwarder/cache, then it is fairly straightforward to add another record at the local level to feed your clients. It would depend on the exact way you host DNS.
Bear in mind that DNS visibility is different from IP visibility. Depending on your network layout, you may need firewall rules to block certain networks from reaching the webserver, regardless of how they learned the IP address of the server.
![](../../users/profiles/492660.webp)
- 113
- 5