How to route traffic to OpenVPN?

Good afternoon.
For protection from the antics of the provider I picked up the OpenVPN tunnel to the router. All is good, but working is OpenVPN problem: can't access my devices from outside, the speed leaves much to be desired (with the same configs on the computer the speed is 25-30mbit, on the router 10-15), and for online games VPN a hindrance (only ping adds). There is a NAS installed with Ubuntu Server 14.04. And that's what I came up with the idea... to Put OpenVPN on the NAS and configured so as to operate as a proxy, ie if I in the browser prescribed proxy 192.168.1.8:port (IP NASa), the browser traffic goes through the OpenVPN tunnel, and where the proxy is not clearly spelled out - will work directly. But the question is - how to do it?
September 26th 19 at 06:20
3 answers
September 26th 19 at 06:22
Whew. Well, muddied you =)

The first option is the NAS raised by the proxy for all NAS's default gateway, the far end of the VPN tunnel. Under this scheme you conecters to the proxy on the NAS, that sends all traffic into the tunnel and then use tunnel depends.

The second variant - somewhere raised a proxy, you connecters to the NAS which made the port forwarding on the same proxy.
The first option is just for me. The problem is that I'm in Linux at the level of "Noob" (to put in and configure something in the instructions - no problem, but myself if something navayal - only system to carefully moving), so I'm interested in a concrete implementation. If you can help please. - Bulah_Welch86 commented on September 26th 19 at 06:25
to set the proxy just help.ubuntu.ru/wiki/%D1%80%D1%83%D0%BA%D0%BE%D0%B2...

but to put it the traffic in the tunnel (if it is now suddenly so) is not very trivial, in the sense that we need marshruty to check and find the reason =) - Daryl23 commented on September 26th 19 at 06:28
Already read mana for Squid, I'll suffer with the traffic, dancing with a tambourine to me tonight provided. Thanks for the help. - Bulah_Welch86 commented on September 26th 19 at 06:31
September 26th 19 at 06:24
And if you do so:
1. The NAS installed with Ubuntu Server 14.04 configure the openvpn client to remote server. Now all traffic from it is wrapped in a vpn tunnel.
2. On the working machine, run ssh in the mode Socks proxy:
habrahabr.ru/post/122445
Get the opportunity in the same browser to point to proxy a local port to which proposed ssh sock proxy.
September 26th 19 at 06:26
You asked and answered =)
0. Your home is just a router without any VPN-s.
1. Where it is remotely VPN server.
2. US is a VPN client for the remote server (using your usual router). All outgoing traffic from the US to Internet is only in the VPN tunnel (a home network 192.168.0.0/24 is not touched).
3. WE raised squid, rules are allowed to operate on your internal intranet.
4. On devices where access is needed for VPN-do you just prescribe SP NASA (proxy).

There are of course drawbacks:
In the VPN tunnel you can direct only applications which are able to work through a proxy, or all traffic from a specific device (say all sorts of phones by default through the VPN). But need a little tweaking US.
But if you take the info from your question - it's not a minus.
Please tell me how to redirect traffic from certain devices? - Bulah_Welch86 commented on September 26th 19 at 06:29
The Dhcp server on the router off. WE put a dhcp server. Then just give the right settings (it's important for us specifically to give US a gate for those who want everything through the VPN). Supposedly by default, all gate is a router, the rest of US with VPN. - Daryl23 commented on September 26th 19 at 06:32
OK, will try, thanks. - Bulah_Welch86 commented on September 26th 19 at 06:35

Find more questions by tags OpenVPNProxy