F
F
firexonix2015-11-03 22:58:46
openvpn
firexonix, 2015-11-03 22:58:46

How to allow only certain sites through openvpn?

Task:
There is a VPS with a raised server configured according to this article . It is also written in server.conf

"push redirect-gateway def1"
so that all client traffic goes through the server.
Question for connoisseurs: how to make sure that traffic goes through the server only for a certain list of sites, and at the same time, how to properly configure the firewall so that all sorts of torrents do not climb, etc.?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
N
nirvimel, 2015-11-03
@firexonix

This will inevitably be an in-browser solution. Since at the OS level only server IPs can differ, and only the browser inside itself distinguishes sites.
And there is such a solution - it's FoxyProxy for FireFox + local proxy (http or socks). In FoxyProxy we set up 2 items: (1) Our local proxy (2) direct connection. Next, rules for specific sites are set. If your direct connection goes through a system-wide vpn, then configure the local proxy so that outgoing from it goes through eth0, that is, bypassing the vpn. Or set up a proxy to work through vpn, and the direct will go through eth0 as usual.
I use almost the exact same setup. Only I have a locally running ssh client as a socks proxy (yes, ssh still can't do that) and no vpn-s (practically zero effort to raise it on the server and not a single command under root locally).

L
LESHIY_ODESSA, 2015-11-03
@LESHIY_ODESSA

Do you have Linux? Then go ahead, storm the manuals - google.com/#q= iptables

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question