-2

I'd like to block or redirect certain domains for anyone using my VPN tunnel (pptp).

I thought simply editing the hosts file would achieve this, but I guess not. Is there another way?

The VPN is set up on a DigitalOcean VPS.

EDIT: I assume the down vote comes from the assumption I want to do something malicious. Actually, I am just trying to set up a kind of Intranet where I can create redirect traffic from a-domain-that-does-not-exist-irl.com to localhost, which will host a web app. The purpose is to show a client their project while it's in progress without putting it public not he Internet.

EDIT2: Why the down votes? Please comment.

1
  • Mouse over the down arrow; the popup says "This question does not show any research effort; it is unclear or not useful". Downvotes without comment may be presumed to be for at least one of those reasons.
    – MadHatter
    Jan 26, 2015 at 12:22

1 Answer 1

2

You need to override your VPN clients' DNS server with a DNS server you have control over, and where you can set the overrides for DNS resolving.

5
  • Does this need to be for each client individually? Or just the DNS my VPN is using (currently Google's 8.8.8.8). If the former, I don't think I agree as I know people at many workplaces log on to a VPN as a way to get on the company's locally hosted JIRA or other service.
    – Noah
    Jan 25, 2015 at 20:06
  • The VPN servers have settings that override the client computers' DNS settings when they connect, so yes, it is the former. Jan 25, 2015 at 23:37
  • Do you mean the latter? Since as you say, the DNS used by my VPN settings override the clients'. In my own experiment, it's the former. But maybe I phrased something wrong. Anyway, assuming the VPN DNS is used, thanks for the info.
    – Noah
    Jan 25, 2015 at 23:54
  • Well, it is a matter of definition actually. The VPN server instructs VPN client to use DNS server provided by the VPN server, not the DNS server provided by local network via DHCP. In my eyes, this is VPN server that makes clients override their DNS settings. Jan 25, 2015 at 23:55
  • OK, so I'll try set up a DNS server and approve your answer if that proves to work out.
    – Noah
    Jan 26, 2015 at 0:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.