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

    VPN connection over a specific gateway (multiwan)

    Scheduled Pinned Locked Moved OpenVPN
    3 Posts 2 Posters 306 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.
    • C
      CvH
      last edited by

      Hi, I have a pfsense setup with 2 wan gateways and several OpenVPN servers running at pfsense (simplified- vlan, carp/failover is also used at this setup).

      wan1 wan1.domain.com (default gateway)
      wan2 wan2.domain.com

      VPN clients are connected through wan2.domain.com to the pfsense, but all outgoing traffic goes through wan1.
      Due bandwidth problems I want to route the traffic through wan2 only.

      I tried to setup a firewall rule like we have it already for other network clients (networkrange 10.20.2.0/24 -> use wan2) but this didn't worked. Changing from "any" to the specific wan adapter at the OpenVPN Server settings didn't worked either (no connection). Changing the default gateway works, but this is sadly no solution for us because default gateway has to be wan1.
      Other clients are already using wan2 due that firewall rule.

      Protocol |   Source    | Port | Destination | Port| Gateway
        IPv4*    10.20.12.34     *         *          *     wan2
      

      Google wasn't too helpful at this topic, maybe someone here could give me a hint how to do it.

      1 Reply Last reply Reply Quote 0
      • RicoR
        Rico LAYER 8 Rebel Alliance
        last edited by

        Not sure if I correctly understand your problem or not...VPN traffic entering WAN2 flows back to the Client via WAN2 by default.
        It is not possible to have a Client conncted to WAN2 and your traffic replies via WAN1 to this Client, this would break your routing and anything.

        -Rico

        1 Reply Last reply Reply Quote 0
        • C
          CvH
          last edited by

          @Rico said in VPN connection over a specific gateway (multiwan):

          It is not possible to have a Client conncted to WAN2 and your traffic replies via WAN1

          tx for pointing out that this is not possible at all, the dynamic dns client at pfsense betrayed me :(
          somehow it updated the ips from the wrong gateway (not sure how this works out, need to check)

          tx for reply !

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