0

I am not sure if I expressed myself clear enough in the question.

Just managed to set up PPTP on my server and I want to know how can I make a website be accessible only from VPN clients. I have apache and other services installed and I can host a website and access it from all over the world. But I want a specific one like: www.therestrictedone.com to be accessible only by VPN clients.

Is this possible?

Can I make apache work simultaneously on two ports. So port 80 is accessible from Internet and 81 only within VPN?

Probably I am saying lot of things without sense? I am just trying to express whats going through my mind with my own words.

1 Answer 1

0

Couple different ways to do this. If you have no intentions of hosting any other site except for vpn access the quickest and easiest way would be to use a firewall and only allow from local network. Anyone that connects to vpn will be given a local address such as 192.168.1.x. So using UFW

 sudo ufw allow from 192.168.1.0/24 to any port 80

If you intend to have other sites and are setting this up as a vhost, usually you can throw in an

 Allow from 192.168.1.0/24

Or

 Allow from 192.168.1.*

In the vhost configuration. I forget the exact format for ip range, but it one of the two referenced above. Just look up info on Apache vhosts

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .