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

    Direct traffic through IPSEC tunnel

    Scheduled Pinned Locked Moved IPsec
    3 Posts 3 Posters 1.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.
    • B
      breakaway
      last edited by

      Hello,

      I have 192.168.254.0/24 at Site A, and 192.168.253.0/24 at Site B.

      Site A pfSense has 3 interfaces.

      WAN – Static IP from my ISP
      LAN -- 10.0.0.0/24
      OPT1 -- 192.168.254.0/24

      Site B pfSense has 4 interfaces

      WAN -- static IP from my ISP
      WAN2 -- static IP from my ISP
      LAN -- internal stuff (not relevant to this)
      OPT1 -- 192.168.253.0/24

      I've got a tunnel up between OPT1 (Site A) <-> OPT1 (Site B)

      I am wanting all traffic that goes into OPT1 at Site A to be directed through the IPSEC tunnel to OPT1 at Site B. Site B contains NAT rules to allow 192.168.253.0/24 to access the internet.

      What sort of settings do I need on the tunnel @ Site A pfSense to make this happen?

      PS, I've found a guide on how to send ALL traffic through the IPSEC tunnel but this is not what I want – I just want traffic out of OPT1 to go through the IPSEC tunnel.

      1 Reply Last reply Reply Quote 0
      • DerelictD
        Derelict LAYER 8 Netgate
        last edited by

        Have you seen this: https://doc.pfsense.org/index.php/Routing_internet_traffic_through_a_site-to-site_IPsec_tunnel

        Note that the phase 2 entry at Site A only applies to local traffic from LAN net.

        Chattanooga, Tennessee, USA
        A comprehensive network diagram is worth 10,000 words and 15 conference calls.
        DO NOT set a source address/port in a port forward or firewall rule unless you KNOW you need it!
        Do Not Chat For Help! NO_WAN_EGRESS(TM)

        1 Reply Last reply Reply Quote 0
        • A
          anomaly0617
          last edited by

          @breakaway:

          Hello,

          I have 192.168.254.0/24 at Site A, and 192.168.253.0/24 at Site B.

          Site A pfSense has 3 interfaces.

          WAN – Static IP from my ISP
          LAN -- 10.0.0.0/24
          OPT1 -- 192.168.254.0/24

          Site B pfSense has 4 interfaces

          WAN -- static IP from my ISP
          WAN2 -- static IP from my ISP
          LAN -- internal stuff (not relevant to this)
          OPT1 -- 192.168.253.0/24

          I've got a tunnel up between OPT1 (Site A) <-> OPT1 (Site B)

          I am wanting all traffic that goes into OPT1 at Site A to be directed through the IPSEC tunnel to OPT1 at Site B. Site B contains NAT rules to allow 192.168.253.0/24 to access the internet.

          What sort of settings do I need on the tunnel @ Site A pfSense to make this happen?

          PS, I've found a guide on how to send ALL traffic through the IPSEC tunnel but this is not what I want – I just want traffic out of OPT1 to go through the IPSEC tunnel.

          Out of curiosity, have you tried setting up an additional phase 2 entry on the tunnel config at Site A to Site B for Source=OPT1 Net, Dest=Net 0.0.0.0/0?

          In theory this would tell all the traffic at Site A that is not local to route through the tunnel. On the other end, you likely don't even need a complementary Phase 2 entry.

          If you do this, keep in mind that you may need a firewall rule for IPSec traffic at Site B to allow this traffic in order for it to work.

          Hope this Helps!

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