How to make your website VPN Only Accessible

How to make your website VPN Only Accessible. As you see in the title, i want to make a subdomain which can be only accessible by a specific VPN nework. I was trying to visit a government but the browser said that This site can’t be reached,
but when I put the details which were given by govt. into my VPN client, the site started working.

Hi
Create an .htaccess file at the root of the subdomain
(under condition that you have a static IP from the VPN)

#Allow only VPN IP
Order Allow,Deny
Allow from 123.456.789.123

Where 123.456.789.123 is VPN IP address.


More info and variations depending on your preferences
mod_authz_host - Apache HTTP Server Version 2.2


6 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.