• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Setting up an "intranet" site on a public VPS

lukebrenner

New Pleskian
Hi there,
I tried to do it alone but somehow I am not getting the result I want therefore here I am crying for help :)
I am trying to build an "intranet" site in my Plesk, let me explain what architecture I have and what I did so far ...

VPS with AMD EPYC 7302 16-Core Processor (10 core(s))
CentOS Linux 7.9.2009 (Core)
Plesk Obsidian - Version 18.0.39 Update #1
32 GB RAM
1 main IP for the server + 4 other IPs available

I have several subscriptions each with several domains, hosted on the shared main IP address, all works well.

What I would like to do is set up an "intranet" site on one of the 4 additional IPs, and it should be reachable ONLY by using OpenVPN.

What I have done so far :
- I have created a new subscription with a non-resolvable domain "mycompany.intranet"
- I have Disabled DNS for this "mycompany.intranet" domain
- assigned IP 92.x.x.90 from the additional IP pool in "Web hosting access"
- created an openvpn cloud account, and set up a DNS entry in openVPN so that mycompany.intranet is bound to 92.x.x.90.
- created a connector, imported the .ovpn file in the openvpn client and set up the right profile.

When using mycompany.intranet in browser WITHOUT openvpn connected, nothing displays, getting a DNS error because the domain is not resolvable and this is CORRECT.
If I connect with OpenVPN client, the page displays properly, so openvpn works fine.

However, even with openvpn not connected, http://92.x.x.90 displays page information, of course because the IP is a public IP.
I tried to create a Firewall rule for this IP to be accessible only from the VPN server's address but there's no predefined rule for that.

What am I doing wrong and if there's a way, can someone please enlighten me ?

Thank you very much in advance.
 
Why use routable addresses at all? RfC1918 addresses should work fine with OpenVPN and avoid this particular problem.
 
What exactly do you mean with "even with openvpn not connected, http://92.x.x.90 displays page information"? Does it show the login page or a white page?

Have you considered using a .htaccess file with this content?
order deny, allow
deny from all
allow from 92.x.x.90

You can even redirect to a custom error page:

Hi, well the key point is that as long as that IP is NOT denied by the firewall, the http(s)://92.x.x.x will ALWAYS show a server placeholder.
So, can someone please tell me HOW can I deny incoming access to that particular IP on port 80 from the Obsidian Firewall feature, and allow it for the OpenVPN server IP ? I see there's a single template in creating a rule, but I cannot do it for a particular IP, that is the problem.
Thanks
 
Back
Top