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

    Blocking Traffic

    Scheduled Pinned Locked Moved General pfSense Questions
    7 Posts 5 Posters 1.4k 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.
    • T Offline
      tomli
      last edited by

      Hi All,

      Can I block the incoming traffic after from Wan? For example:

      Client (ICMP: echo request) = > Wan => (Wan Rule: Pass Any Any) PFsense => Server

      Client <= Wan <= PFsense (Lan Rule: Block Any Any) <= (ICMP: echo reply) Server

      I set the Lan block anything from my server. Client still can receive my echo reply. I want to record who ping my server, but I don't want the client receive my server echo reply. I don't want to set server to block it.  Can I do it in PFsense? Please advise.

      Thanks,
      Tom

      1 Reply Last reply Reply Quote 0
      • KOMK Offline
        KOM
        last edited by

        First of all, you don't want to pass all traffic through WAN.  You put firewall rules on the interfaces where the traffic is incoming.  SO to block stuff from entering your network, you put the rule on WAN, not LAN.  Right now your network is wide open to the outside world.

        You can create a specific rule on WAN to block all ICMP and then set the rule to log, and place the rule at the top so it gets triggered before the Default Deny rule.  All ICMP will be blocked and all ping attempts will be logged.

        1 Reply Last reply Reply Quote 0
        • T Offline
          tomli
          last edited by

          Hi,

          Thank you for your suggestion.

          But I don't really want to block it in Wan Port, can I block it in Lan port?

          Thanks

          1 Reply Last reply Reply Quote 0
          • H Offline
            Harvy66
            last edited by

            For the most part, you can only block incoming traffic. If you want to block traffic on the LAN interface, you'll be limited to blocking traffic that originates on the LAN.

            1 Reply Last reply Reply Quote 0
            • P Offline
              phil.davis
              last edited by

              The echo reply is allowed back because pfSense is a stateful firewall. When the echo request goes out, a state is created for the source-destination IP+protocol… combination. When the echo reply packet is received back on WAN it is allowed in and through to the client because it matches an existing state.
              This is exactly the same as web browsing... - the page content coming back from an external web site is allowed in on WAN because the client request from the browser has first gone out to the web server and a state has thus been created.

              As the Greek philosopher Isosceles used to say, "There are 3 sides to every triangle."
              If I helped you, then help someone else - buy someone a gift from the INF catalog http://secure.inf.org/gifts/usd/

              1 Reply Last reply Reply Quote 0
              • KOMK Offline
                KOM
                last edited by

                But I don't really want to block it in Wan Port, can I block it in Lan port?


                No.  That's not how it works.  If you want to block pings on WAN then you need to put your rule on WAN.  Blocking ping on WAN from LAN is kind of pointless.

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

                  so you have a any any rule on wan?  Yeah that is not good…

                  "Wan => (Wan Rule: Pass Any Any) PFsense => Server"

                  If this is what you want
                  "I want to record who ping my server"

                  Why don't you just setup a wan block ping with logging?  Why wold you want to send it all they way to the server, just to block the servers reply?

                  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 25.07.1 | Lab VMs 2.8, 25.07.1

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