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

    Firewall on WAN interface acts not as I expected

    Scheduled Pinned Locked Moved Firewalling
    2 Posts 2 Posters 744 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.
    • A Offline
      Alex_
      last edited by

      i have 2 locations with 2 different WAN IPs.

      1 PC on location A
      1 PC on location B

      I am at location A. i connect with Teamviewer (remote desktop software) to PC on location B.
      from location B (through Teamviewer) I ping public WAN IP of location A. no response (default firewall rule) thats what I expect.

      then I change on pfSense firewall on Location A:
      pass, ICMP traffic from WAN to any
      save and apply
      i check trough Teamviewer: from location B I ping public WAN IP of location A, ping is answering seconds after clicking on apply, thats what I expect.

      then i change on pfSense Firewall on location A:
      block, ICMP traffic from WAN to any.
      save and apply:
      i check: from location B ping to public WAN IP of location A, i expect "no response", but indeed ping is still answering.

      then I had a 2nd thought: I change on pfSense Firewall:
      delete rule "block, ICMP traffic from WAN to any" (so default deny rule on WAN should handle this)
      save and apply:
      I check: from location B ping to public WAN IP of location A: I expect "no response" but still ping is answering.

      Why?

      but:
      if I reboot pfSense firewall, after reboot pfSense is acting correctly.
      ping from location B to public WAN IP of location A is now correct with "no response", as I expect.

      If I follow procedure again as discribed above (pass, block, delete) same behaviour.
      ping is answering.
      but I expect "no answer" after setting "block" rule or after "deleteing" ICMP WAN to any rule.
      I can reproduce this behaviour.

      what are I am doing wrong?

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

        Even though ICMP (ping) is stateless, pf still creates a state when a packet comes in that matches a pass rule. Then when later similar packets come in, they just match that state rather than every packet being processed by the rule set.
        If no matching packets are received for a while (not sure how long that is - should look it up some time) then the state will be cleared.

        If you change firewall rules, existing states are not automatically cleared. So "pings" that worked will continue to work if you keep them running.

        Diagnostics->States, Reset States - there is some explanation text there. After making rule changes like you describe, reset states and then test.

        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
        • First post
          Last post
        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.