Direct traffic through IPSEC tunnel



  • 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.


  • Netgate

    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.



  • @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.