Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    pfsense : forward all LAN traffic to a proxy

    Scheduled Pinned Locked Moved General pfSense Questions
    androidproxypfsense setupnetworkforwarding
    7 Posts 3 Posters 3.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      terdexx89
      last edited by terdexx89

      i tried this setup with an android phone

      android phone connected to a proxy and make a vpn connection

      android phone connected to pc (via usb tethering) with (pdanet+ adapter)

      (pdanet+ adapter) as pfsense wan on virtualbox

      now with this setup i am able to forward all pfsense lan traffic to proxy thru my android phone,

      my question is there other way to forward pfsense lan traffic to proxy, without android phone.

      V johnpozJ 2 Replies Last reply Reply Quote 0
      • V
        viragomann @terdexx89
        last edited by

        @terdexx89 said in pfsense : forward all LAN traffic to a proxy:

        my question is there other way to forward pfsense lan traffic to proxy

        Which kind of "proxy" do you mean here?
        A vpn gateway, tunneling your internet traffic and masquerading your IP?

        T 1 Reply Last reply Reply Quote 0
        • T
          terdexx89 @viragomann
          last edited by

          @viragomann an http, https and socks proxy,
          my goal is to make all LAN traffic use proxy ip instead of my local isp ip

          V 1 Reply Last reply Reply Quote 0
          • V
            viragomann @terdexx89
            last edited by

            @terdexx89
            So I assume, the proxy is in your local network.

            You can direct the traffic to any IP you want. You can set the proxy IP as default gateway, so the whole upstream traffic goes to the proxy.
            If you want to pass only certain protocols to the proxy you can do this with policy routing rules.

            T 1 Reply Last reply Reply Quote 1
            • T
              terdexx89 @viragomann
              last edited by

              @viragomann can you give me a screenshot of pfsense on how to use a proxy as gateway on lan

              V 1 Reply Last reply Reply Quote 0
              • V
                viragomann @terdexx89
                last edited by

                @terdexx89
                No, I don't have such set up.

                The exact settings depend on your network, how your LAN and the proxy are connected and if you want to run the proxy in transparent mode.
                I guess, pfSense is your upstream router and the default gateway on the LAN.

                Also consider, that you could run squid proxy server on pfSense itself. So there would be no need for special routing at all.

                1 Reply Last reply Reply Quote 0
                • johnpozJ
                  johnpoz LAYER 8 Global Moderator @terdexx89
                  last edited by johnpoz

                  @terdexx89 said in pfsense : forward all LAN traffic to a proxy:

                  android phone connected to a proxy and make a vpn connection

                  Ok I'm a bit confused - are you saying your phone can not connect to this vpn connection unless it bounces off this proxy?

                  If pfsense can make a vpn connection to where your phone is connecting or any other vpn service on the internet, then you could route all clients behind pfsense through this vpn.. This is just a client vpn connection on pfsense and people do this all the time..

                  Pfsense does have the ability to use an upstream proxy, but I am not sure if it would then route its vpn connection through this proxy?

                  https://docs.netgate.com/pfsense/en/latest/config/advanced-misc.html#proxy-support

                  I take it your goal is to use pfsense to route your device behind pfsense through the vpn connection? Which users do all the time. What I am confused about is the added proxy? My understanding of the upstream proxy feature of pfsense is so pfsense can access updates and packages. I am not clear on if you set this upstream proxy, and then setup a client vpn connection in pfsense if it would make that connection through the proxy.

                  But once pfsense has this vpn connection, it is quite simple to route devices behind pfsense through this vpn connection.

                  edit:
                  If you want your vpn client on pfsense to bounce off a proxy, those settings are in the vpn client setup

                  https://docs.netgate.com/pfsense/en/latest/vpn/openvpn/configure-client.html#proxy-settings

                  An intelligent man is sometimes forced to be drunk to spend time with his fools
                  If you get confused: Listen to the Music Play
                  Please don't Chat/PM me for help, unless mod related
                  SG-4860 24.11 | Lab VMs 2.7.2, 24.11

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post
                  Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.