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

VLAN an Firewall rule not matching

L2/Switching/VLANs
3
68
11.0k
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.
  • I
    interessierter
    last edited by Dec 13, 2021, 3:20 PM

    @johnpoz I plan to have 4 different VLANS, and the first vlan should be a iot Vlan that only allow Internet access. Right now this nating route route to my "main" network so the separation does not make sense.

    J 1 Reply Last reply Dec 13, 2021, 3:24 PM Reply Quote 0
    • J
      johnpoz LAYER 8 Global Moderator @interessierter
      last edited by Dec 13, 2021, 3:24 PM

      @interessierter you lost me..

      Your traffic is not matching from the last you posted, the firewall rule shows 0/0

      The other firewall entry you listed was firewall generating traffic.

      If you say you can get to this IP from another vlan.. It wouldn't have anything to do with outbound nat, port forwards could be.. But I don't see any portforwards on your lan that would match that traffic.

      If your saying your client can get to that IP, maybe its taking a different path... Maybe its on the same L2 and you have the client with the wrong mask?

      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.7.2, 24.11

      I 1 Reply Last reply Dec 13, 2021, 3:45 PM Reply Quote 0
      • I
        interessierter @johnpoz
        last edited by Dec 13, 2021, 3:45 PM

        @johnpoz Yes maybe I m lost.

        The main network is 192.168.1.0/24, the VLAN 10.40.23.99/24

        The Client (mobile phone) is connected with a Access Point, the SSID is tagged with 4000, the switch have a configuration as hybrid port, and the tags 1000,2000,3000,4000,1 is configured. Than the switch connect to pfsense with the same config.

        As I can see the allow of the connection from the 10.40.23/24 network to 192.168.1.0/24 in the pfsense log I guess, that the routing must be happening here and not before.

        Here a post again of my port forwardings, that also does not contain any network that is in question here:

        login-to-view

        J 1 Reply Last reply Dec 13, 2021, 3:46 PM Reply Quote 0
        • J
          johnpoz LAYER 8 Global Moderator @interessierter
          last edited by johnpoz Dec 13, 2021, 3:49 PM Dec 13, 2021, 3:46 PM

          @interessierter said in VLAN an Firewall rule not matching:

          As I can see the allow of the connection from the 10.40.23/24 network to 192.168.1.0/24 in the pfsense log I guess

          where?

          Here?

          login-to-view

          The allowed there is because the traffic was generated by pfsense.. There are rules that let the firewall go where it wants..

          [21.05.2-RELEASE][admin@sg4860.local.lan]/root: pfctl -sr | grep "let out"
          pass out inet all flags S/SA keep state allow-opts label "let out anything IPv4 from firewall host itself"
          pass out inet6 all flags S/SA keep state allow-opts label "let out anything IPv6 from firewall host itself"
          

          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.7.2, 24.11

          I 1 Reply Last reply Dec 13, 2021, 5:14 PM Reply Quote 0
          • I
            interessierter @johnpoz
            last edited by Dec 13, 2021, 5:14 PM

            @johnpoz Yes but to be honest I don t know what rule that should be? How does such a rule look like?

            J 1 Reply Last reply Dec 13, 2021, 5:16 PM Reply Quote 0
            • J
              johnpoz LAYER 8 Global Moderator @interessierter
              last edited by johnpoz Dec 13, 2021, 5:19 PM Dec 13, 2021, 5:16 PM

              @interessierter I just showed you what the rule looks like ;)

              Its a hidden rule.

              You can view all the rules via
              https://docs.netgate.com/pfsense/en/latest/firewall/pf-ruleset.html

              There are a few hidden rules, mostly to keep users from shooting themselves in the foot ;) Common example of these is when you enable dhcp server on an interface, rules are created (hidden) that make sure dhcp will work.

              notice those rules are pass "out" rules, which is why you see the little black triangle on the firewall entry.

              What I would look into is why your rule is not triggering? Do you still show 0/0 for the states on your block 192_netz rule? You could look in your tables under the diagnotic menu to make sure that table is showing your 192.168.1/24 network.

              Possible your rules have not be loaded?

              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.7.2, 24.11

              I 1 Reply Last reply Dec 13, 2021, 5:56 PM Reply Quote 0
              • I
                interessierter @johnpoz
                last edited by Dec 13, 2021, 5:56 PM

                @johnpoz My rules are definitly saved and loaded, the tables show this:

                login-to-view

                Yes it s still zero

                J 1 Reply Last reply Dec 13, 2021, 6:19 PM Reply Quote 0
                • J
                  johnpoz LAYER 8 Global Moderator @interessierter
                  last edited by johnpoz Dec 13, 2021, 6:21 PM Dec 13, 2021, 6:19 PM

                  @interessierter that is not the 192_netz table..

                  Also why are you natting a 172.168.1.0? that is a typo? without a mask?

                  See here is my rfc1918 alias table I created entries

                  login-to-view

                  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.7.2, 24.11

                  I 1 Reply Last reply Dec 13, 2021, 6:27 PM Reply Quote 0
                  • I
                    interessierter @johnpoz
                    last edited by interessierter Dec 13, 2021, 6:28 PM Dec 13, 2021, 6:27 PM

                    @johnpoz I dont know but I guess it will not solve the issue right?

                    I have for my main network right now 192.168.1.0/24
                    vlan 10.10.23.99/24
                    vlan2 10.20.23.99/24
                    vlan3 10.30.23.99/24
                    vlan4 10.40.23.99/24
                    vlan5 10.45.23.99/24

                    My 192 Netz only contains 192.168.1.0/24, because I want to block requests to this network

                    J 1 Reply Last reply Dec 13, 2021, 6:29 PM Reply Quote 0
                    • J
                      johnpoz LAYER 8 Global Moderator @interessierter
                      last edited by Dec 13, 2021, 6:29 PM

                      @interessierter I get that.. But your not showing that the table actually loaded.

                      And your rule is not triggering from the 0/0 in the states column.. Why its not is the question.. Maybe the table didn't load? Maybe your client isn't going through pfsense?

                      I don't see any other rules above it that would allow the traffic..

                      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.7.2, 24.11

                      I 1 Reply Last reply Dec 13, 2021, 6:31 PM Reply Quote 0
                      • I
                        interessierter @johnpoz
                        last edited by johnpoz Dec 13, 2021, 6:32 PM Dec 13, 2021, 6:31 PM

                        @johnpoz What table you want to see?

                        J 1 Reply Last reply Dec 13, 2021, 6:32 PM Reply Quote 0
                        • J
                          johnpoz LAYER 8 Global Moderator @interessierter
                          last edited by johnpoz Dec 13, 2021, 6:34 PM Dec 13, 2021, 6:32 PM

                          @interessierter

                          The table alias you created the 192_netz table.

                          What version of pfsense are you running exactly? There was some issues in the dev versions the other day where state tables not counting.. and all showing 0/0

                          Alias tables normally do not populate until used in a rule.. But lets make sure the alias you created actually created the table and put in the 192.168.1.0/24 network.

                          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.7.2, 24.11

                          I 1 Reply Last reply Dec 13, 2021, 6:37 PM Reply Quote 0
                          • I
                            interessierter @johnpoz
                            last edited by Dec 13, 2021, 6:37 PM

                            @johnpoz login-to-view

                            login-to-view

                            J 1 Reply Last reply Dec 13, 2021, 6:45 PM Reply Quote 0
                            • J
                              johnpoz LAYER 8 Global Moderator @interessierter
                              last edited by johnpoz Dec 13, 2021, 6:49 PM Dec 13, 2021, 6:45 PM

                              @interessierter dude that is not the actual TABLE that is created from the alias..

                              Go to the diagnostic menu, pick tables then select your 192_netz table.. Does it list this network, do you see the table in the table drop down?

                              See my above example showing my rfc1918 table created from my rfc1918 alias.

                              What I am trying to verify is this

                              login-to-view

                              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.7.2, 24.11

                              I 1 Reply Last reply Dec 17, 2021, 1:25 PM Reply Quote 0
                              • I
                                interessierter @johnpoz
                                last edited by Dec 17, 2021, 1:25 PM

                                @johnpoz said in VLAN an Firewall rule not matching:

                                @interessierter dude that is not the actual TABLE that is created from the alias..

                                Go to the diagnostic menu, pick tables then select your 192_netz table.. Does it list this network, do you see the table in the table drop down?

                                See my above example showing my rfc1918 table created from my rfc1918 alias.

                                What I am trying to verify is this

                                login-to-view

                                Sorry do you mean here? If yes, the 192_Netz is not here:
                                login-to-view

                                J 1 Reply Last reply Dec 17, 2021, 1:29 PM Reply Quote 0
                                • J
                                  johnpoz LAYER 8 Global Moderator @interessierter
                                  last edited by Dec 17, 2021, 1:29 PM

                                  @interessierter well if you do not see your table populated, then that would explain why that rule is not working.

                                  As I highlighted, tables that you create with an alias are not populated until they are put into a rule, and the rule is loaded.

                                  If your not seeing the table listed under diagnostics. Then no it wouldn't work..

                                  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.7.2, 24.11

                                  I 1 Reply Last reply Dec 17, 2021, 1:32 PM Reply Quote 0
                                  • I
                                    interessierter @johnpoz
                                    last edited by Dec 17, 2021, 1:32 PM

                                    @johnpoz said in VLAN an Firewall rule not matching:

                                    @interessierter well if you do not see your table populated, then that would explain why that rule is not working.

                                    As I highlighted, tables that you create with an alias are not populated until they are put into a rule, and the rule is loaded.

                                    If your not seeing the table listed under diagnostics. Then no it wouldn't work..

                                    But what did I wrong? I have saved and applied the rule after creating, and I m sure that the firewall was also rebooted in the time between (what should be anyway not required).

                                    J 1 Reply Last reply Dec 17, 2021, 1:45 PM Reply Quote 0
                                    • J
                                      johnpoz LAYER 8 Global Moderator @interessierter
                                      last edited by Dec 17, 2021, 1:45 PM

                                      @interessierter You sure your not seeing a error about memory? You sure look to have a lot of aliases..

                                      And none of your rules show any hits at all - they all show 0/0 for states.

                                      When you have lots entries in your tables - it can cause a memory issue.

                                      There are many a thread related to this about. Here for example

                                      https://forum.netgate.com/topic/154266/error-s-loading-the-rules-tmp-rules-debug-28-cannot-define-table-pfb_pri2_alienvault_v4-cannot-allocate-memory

                                      Have you increased your table entries?

                                      login-to-view

                                      This setting is system / advanced / firewall & nat

                                      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.7.2, 24.11

                                      1 Reply Last reply Reply Quote 0
                                      • B
                                        Bob.Dig LAYER 8
                                        last edited by Bob.Dig Dec 17, 2021, 2:05 PM Dec 17, 2021, 2:04 PM

                                        This post is deleted!
                                        J 1 Reply Last reply Dec 17, 2021, 2:13 PM Reply Quote 0
                                        • J
                                          johnpoz LAYER 8 Global Moderator @Bob.Dig
                                          last edited by Dec 17, 2021, 2:13 PM

                                          @bob-dig said in VLAN an Firewall rule not matching:

                                          It looks like an alias can't start with a number

                                          Looks to be working here..

                                          login-to-view

                                          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.7.2, 24.11

                                          B 1 Reply Last reply Dec 17, 2021, 2:14 PM Reply Quote 1
                                          38 out of 68
                                          • First post
                                            38/68
                                            Last post
                                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.