Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    Site to site OpenVPN for only some traffic

    Scheduled Pinned Locked Moved General pfSense Questions
    4 Posts 2 Posters 1.2k 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.
    • 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

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post
            Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
            Privacy Policy · Cookie Policy