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

    Block Wireguard from connecting on LAN Address

    Scheduled Pinned Locked Moved WireGuard
    5 Posts 2 Posters 1.0k 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.
    • D
      dapersico
      last edited by

      How can I stop local LAN clients from connecting to Wireguard on the LAN address? I only want remote clients to be able to connect to Wireguard. LAN firewall rules seem to have no effect.

      Thanks!
      Dwayne

      johnpozJ 1 Reply Last reply Reply Quote 0
      • johnpozJ
        johnpoz LAYER 8 Global Moderator @dapersico
        last edited by

        @dapersico what are your lan rules? If your listening on port X then block access to that port on the lan interface "this firewall" would prevent them from accessing it.

        Top down, first rule to trigger wins, no other rules evaluated.

        Keep in mind once you put in a block rule, you need to make sure there are no existing states for that traffic your trying to block already there, or would still be allowed. So you either need to kill any existing states for that connection, or wait for them to time out.

        An intelligent man is sometimes forced to be drunk to spend time with his fools
        If you get confused: Listen to the Music Play
        Please don't Chat/PM me for help, unless mod related
        SG-4860 24.11 | Lab VMs 2.8, 24.11

        D 1 Reply Last reply Reply Quote 0
        • D
          dapersico @johnpoz
          last edited by

          @johnpoz said in Block Wireguard from connecting on LAN Address:

          Keep in mind once you put in a block rule, you need to make sure there are no existing states for that traffic your trying to block already there, or would still be allowed. So you either need to kill any existing states for that connection, or wait for them to time out.

          Well, it appears my rule was correct. It is the existing states that is my problem. I'll try this now.

          Thanks!

          D 1 Reply Last reply Reply Quote 0
          • D
            dapersico @dapersico
            last edited by

            @johnpoz still didn't work for me. Here is my rule:

            States Protocol Source Port Destination Port Gateway Queue Schedule Description Actions
            0 /4 KiB IPv4 UDP * * LAN address 51820 * none

            I also tried "LAN net" as the source but no difference.

            johnpozJ 1 Reply Last reply Reply Quote 0
            • johnpozJ
              johnpoz LAYER 8 Global Moderator @dapersico
              last edited by

              @dapersico post a screenshot of your rules please.

              And do you have any rules in your floating tab?

              That looks like it was evaluated with that 0/4.. But to be honest, why would the client even try to be connecting to your lan address, that would never work from the internet. So its prob going to your wan address.

              Which is why I suggested use "this firewall" alias - this would be all your pfsense IPs..

              An intelligent man is sometimes forced to be drunk to spend time with his fools
              If you get confused: Listen to the Music Play
              Please don't Chat/PM me for help, unless mod related
              SG-4860 24.11 | Lab VMs 2.8, 24.11

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