Direct traffic to proxy server after VPN? (for firewall functions)

This forum is for general conversation and user-user networking.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Post Reply
User avatar
Nemesis
OpenVpn Newbie
Posts: 15
Joined: Sun Apr 08, 2018 7:30 pm

Direct traffic to proxy server after VPN? (for firewall functions)

Post by Nemesis » Tue May 11, 2021 6:47 pm

I've read a lot about how to connect to an openvpn server via a proxy, but is it possible to do the other way?.

I want to connect to my own VPN server (Powered by LuCI openwrt-21.02), and then go thru a proxy.

(because I want to block several of advertisment servers and stuff)
The openvpn server don't have any (or does it?) "filter" / firewall where I can specify denied ip addresses

is it possible to specify an "out" proxy on the VPN server, or even better, denie/redirect directly from the VPN server on some kind of ip-list?

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Direct traffic to proxy server after VPN? (for firewall functions)

Post by TinCanTech » Tue May 11, 2021 7:40 pm

Nemesis wrote:
Tue May 11, 2021 6:47 pm
I want to connect to my own VPN server (Powered by LuCI openwrt-21.02), and then go thru a proxy
Simply configure your normal proxy in say Firefox etc..

User avatar
Nemesis
OpenVpn Newbie
Posts: 15
Joined: Sun Apr 08, 2018 7:30 pm

Re: Direct traffic to proxy server after VPN? (for firewall functions)

Post by Nemesis » Wed May 12, 2021 7:01 pm

TinCanTech wrote:
Tue May 11, 2021 7:40 pm
that would work for the browser, but now I want everything to go thru some kind of proxy / firewall

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Direct traffic to proxy server after VPN? (for firewall functions)

Post by TinCanTech » Wed May 12, 2021 7:03 pm

That is your OS not Openvpn.

User avatar
Nemesis
OpenVpn Newbie
Posts: 15
Joined: Sun Apr 08, 2018 7:30 pm

Re: Direct traffic to proxy server after VPN? (for firewall functions)

Post by Nemesis » Wed May 12, 2021 7:11 pm

TinCanTech wrote:
Wed May 12, 2021 7:03 pm
That is your OS not Openvpn.
if I connect from a phone to my openvpn server, it must be the openvpn server that's deciding which traffic that's allowed thru?

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Direct traffic to proxy server after VPN? (for firewall functions)

Post by TinCanTech » Wed May 12, 2021 7:32 pm

Nemesis wrote:
Tue May 11, 2021 6:47 pm
I want to connect to my own VPN server
Nemesis wrote:
Wed May 12, 2021 7:11 pm
it must be the openvpn server that's deciding which traffic that's allowed thru?
It is your server .. don't you know what is allowed thru ?

Cutting to the inevitable chase, here are some blanks for you to fill in:
viewtopic.php?f=30&t=22603

Stephanie_Sy
OpenVPN User
Posts: 20
Joined: Mon May 31, 2021 4:51 pm

Re: Direct traffic to proxy server after VPN? (for firewall functions)

Post by Stephanie_Sy » Mon May 31, 2021 4:52 pm

The VPN setting should override the setting of your proxy, so you cannot use both proxy and VPN at the same time.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Direct traffic to proxy server after VPN? (for firewall functions)

Post by TinCanTech » Mon May 31, 2021 5:39 pm

Openvpn proxy settings in the openvpn config file do not interfere with your other proxy settings.

Unless your OS imposes some other restrictions.

User avatar
Nemesis
OpenVpn Newbie
Posts: 15
Joined: Sun Apr 08, 2018 7:30 pm

Re: Direct traffic to proxy server after VPN? (for firewall functions)

Post by Nemesis » Sat Sep 04, 2021 12:08 pm

TinCanTech wrote:
Mon May 31, 2021 5:39 pm
It's been a while, I've actually forgot I already asked here (I do actually have memory issues), but now I'm back..

I might need to explain it better.

if you install an OpenVPN server on for example Ubuntu, and then connect to the OpenVPN server, you will be routed thru the VPN, that's the point.

but, what I'm after, is to setup the OpenVPN server, so that instead of just letting everything out, it will redirect everything to a proxy server.(where ads & trackers will be blocked with squid & squidGuard)

is there any configuration in OpenVPN server where you can direct the output, to for example an proxy, or another VPN server?

I know that a user could add the proxy settings in their browser, but that would only affect the browser, not the rest of the computer..

so Computer/phone <-> OpenVPN <-> proxy with filter <-> internet.

OR if there are any filter available for for OpenVPN (because then the Proxy isn't necessary)..

sorry if I'm being stupid, have been looking at different solutions since the first post.

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Direct traffic to proxy server after VPN? (for firewall functions)

Post by TinCanTech » Sat Sep 04, 2021 5:30 pm

I think you need something like pihole.

User avatar
Nemesis
OpenVpn Newbie
Posts: 15
Joined: Sun Apr 08, 2018 7:30 pm

Re: Direct traffic to proxy server after VPN? (for firewall functions)

Post by Nemesis » Sun Sep 05, 2021 12:15 pm

TinCanTech wrote:
Sat Sep 04, 2021 5:30 pm
I think you need something like pihole.
Pihole has passed my mind, but surely it must be possible to route the output from the OpenVPN server somehow to a proxy server, or am I completely misunderstanding something?

TinCanTech
OpenVPN Protagonist
Posts: 11137
Joined: Fri Jun 03, 2016 1:17 pm

Re: Direct traffic to proxy server after VPN? (for firewall functions)

Post by TinCanTech » Sun Sep 05, 2021 9:40 pm

Routing via this or that does not necessarily engage the services on offer by the host.

I think you are missing something .. so I recommend you start with pi-hole.

User avatar
Nemesis
OpenVpn Newbie
Posts: 15
Joined: Sun Apr 08, 2018 7:30 pm

Re: Direct traffic to proxy server after VPN? (for firewall functions)

Post by Nemesis » Thu Sep 09, 2021 12:11 pm

TinCanTech wrote:
Sun Sep 05, 2021 9:40 pm
Routing via this or that does not necessarily engage the services on offer by the host.
What?

what do you mean with engage the services?

all I want is to route everything from the OpenVPN server to a proxy server, that can't be so hard?
my question is pretty simple; can OpenVPN be told to exit thru a proxy server, or do I need to have the OpenVPN installed on another server, and route the whole dang thing thru the proxy?

..and, sorry for the long delay, don't get any notifications, even thou I've selected it..

..and yes, my memory are so bad that I forget to check for answers..

bert269
OpenVpn Newbie
Posts: 3
Joined: Wed Dec 02, 2020 4:11 pm

Re: Direct traffic to proxy server after VPN? (for firewall functions)

Post by bert269 » Thu Jan 18, 2024 5:03 pm

Routing traffic through a VPN and then a proxy is definitely doable, though it's a bit of a setup. I've done something similar for privacy reasons. Essentially, after connecting to your VPN, you can set your device to use a proxy for further filtering. As for your VPN server, OpenWRT-based systems like LuCI should allow firewall configurations. You can usually set rules directly in LuCI to block or redirect specific IP addresses, which might be easier and more efficient than using a separate proxy for that purpose. Just dive into the firewall settings on your LuCI dashboard, and you should be able to set up those IP blocklists or redirects right there.

cilimpuli
OpenVpn Newbie
Posts: 2
Joined: Fri Jul 03, 2020 11:22 am

Re: Direct traffic to proxy server after VPN? (for firewall functions)

Post by cilimpuli » Wed Jan 24, 2024 8:43 am

You can make your VPN traffic through a proxy for extra blocking. I do this, too. I connect to my VPN first and then send the data through a proxy. This way, I get both the VPN's safety and the proxy's extra blocking power.

If your VPN with OpenWRT can't block ads or certain websites directly, using a proxy after the VPN can help. You can set up the proxy to stop the stuff you don't want.

I buy proxy for this. I like the anonymous ones because they keep things private. They're cheap too. I only pay about $1.4 for each one. It's a good deal for the extra control and privacy I get, and it might work well for what you need, too.

Post Reply