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

    Site to site OpenVPN for only some traffic

    General pfSense Questions
    2
    4
    424
    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.
    • P
      pedreter
      last edited by

      Hi!

      i have a site to site openvpn between 2 pfsense boxes working like a charm…

      Currently all traffic between sites is going through the tunnel in both ways but i would like to have an exception... SSH traffic!

      is there any way to make ssh traffic between sites not going through the tunnel?

      Maybe this is a trivial question but to my knowledge it is everything or nothing!

      Thanks!

      Pedreter

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

        You have to do policy based routing:
        https://doc.pfsense.org/index.php/What_is_policy_routing

        Add a firewall rule which allow SSH (dest. port 22) to the interface, where the traffic comes in. In the rule open the advanced options, go down to gateway and select your WAN gateway.
        Place this rule above the default rule.

        1 Reply Last reply Reply Quote 0
        • P
          pedreter
          last edited by

          @viragomann:

          You have to do policy based routing:
          https://doc.pfsense.org/index.php/What_is_policy_routing

          Add a firewall rule which allow SSH (dest. port 22) to the interface, where the traffic comes in. In the rule open the advanced options, go down to gateway and select your WAN gateway.
          Place this rule above the default rule.

          Thanks Viragomann…

          i have to be doing something wrong because it does not work... after following your instructions SSH traffic still goes through the tunnel...

          is there any other detail to have in consideration???

          Thanks!

          Pedreter.

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

            Have you put this rule to the top of the ruleset?

            1 Reply Last reply Reply Quote 0
            • First post
              Last post