Use Squid for IPSec HTTP Traffic

  • Hi all

    I read a lot of topics and search for many hours for a solution that solve my problem. I can't find anything that works.

    My Problem:

    IPSec for Roadwarrior Clients with redirect Gateway. That means, every Client Traffic goes to the IPSec tunnel. This is for Security reasons (e.x. Free unencrypted WiFi).

    Now I installed squid & squidguard in transparent mode on my pfsense. That works great for all clients in LAN.

    All the Traffic from the IPSec Clients not pass squid and go directly to the internet (I think because Input Interface = IPSec / Output Interface = WAN, so don't pass LAN).

    So I found the idea to make a Redirect NAT (Source: IPSec Subnet (, Destination: NOT LAN Subnet (!, Original Port TCP 80, Translated Port TCP 3128, Redirected IP:

    Now the browser from my IPSec Client only shows a error message "Invalid Request" from Squid. How i can fix this? Any Ideas?

    Thanks a lot.

  • I can't see the forest for the trees.

    Now I configured a Proxy in the VPN-Settings for the Client.
    Then I added a Rule on IPSec Interface that blocks all HTTP/HTTPS Traffic not going to the Proxy or the LAN Subnet.

    It seems to work fine now.

Log in to reply