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

    None of my firewall rules are working on VLANs

    Scheduled Pinned Locked Moved Firewalling
    36 Posts 5 Posters 2.9k 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.
    • V
      viragomann @ErniePantuso
      last edited by

      @ErniePantuso
      It's in automatic mode by default.

      And if you go to the outbound NAT page, you can see the automatically added rules at the bottom. Please check, if all your subnets are shown up there.

      E 1 Reply Last reply Reply Quote 0
      • E
        ErniePantuso @viragomann
        last edited by

        @viragomann NAT.png

        johnpozJ V 2 Replies Last reply Reply Quote 0
        • J
          Jarhead @ErniePantuso
          last edited by Jarhead

          @ErniePantuso You need to read up on rules. They need to be on the interface the traffic originates on. You have a rule on bizvlan with a destination of bizvlan. Not gonna work.
          You have an any/any rule with other pass rules below it. Not gonna work.
          If you want to block (or allow) the bizvlan access to LAN, the rule goes on bizvlan.

          You have no traffic shown on the bizvlan rules. Are you sure you're even connecting to it? Does it get a DHCP address if you connect to it?

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

            @ErniePantuso Why are blocking bogon on your lan side interfaces? How would bogon ever be on your lan side as a source? You understand rfc1918 is bogon.. That anything at all can work is pfsense pulls rfc1918 out of the bogon rule.. There is no point to putting bogon on any of your lan side interfaces.

            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

            E 1 Reply Last reply Reply Quote 0
            • V
              viragomann @ErniePantuso
              last edited by

              @ErniePantuso
              This one:
              Firewall > NAT > Outbound

              E 1 Reply Last reply Reply Quote 0
              • E
                ErniePantuso @viragomann
                last edited by

                @viragomann
                NAT-outbound.png

                1 Reply Last reply Reply Quote 0
                • E
                  ErniePantuso @johnpoz
                  last edited by

                  @johnpoz said in None of my firewall rules are working on VLANs:

                  @ErniePantuso Why are blocking bogon on your lan side interfaces?

                  That was the default so I left it.

                  There is no point to putting bogon on any of your lan side interfaces.

                  Got it. Fixed. Thanks!

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

                    @ErniePantuso said in None of my firewall rules are working on VLANs:

                    That was the default so I left it.

                    No it is not that is for sure.. It is default on the WAN, not any other interface.

                    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

                    E 1 Reply Last reply Reply Quote 0
                    • E
                      ErniePantuso @johnpoz
                      last edited by

                      @johnpoz said in None of my firewall rules are working on VLANs:

                      @ErniePantuso said in None of my firewall rules are working on VLANs:

                      That was the default so I left it.

                      No it is not that is for sure.. It is default on the WAN, not any other interface.

                      OK. I guess I don't remember when or why that got changed. I've really struggled to learn all this stuff; I've asked for and received help from a lot of different sources. Either I got some bad information or (more likely) I misunderstood the info I got.

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

                        @ErniePantuso It has never been the default, ever - because it make no logical sense at all.. I have been running pfsense pretty much since it has come out.. And never has block bogon been a thing on the lan side.. It only makes sense on the wan. And even then its not very useful or needed..

                        If you mean when you changed it ok ;) its not a thing anyone would ever have need to do.. And if pfsense didn't pull out rfc1918 from the bogon list you would of broken your network.. Would of remembered then when you changed it ;) hehehe

                        They enable you to be able to check it - because maybe its a transit network, and you have no idea what the source would be, or maybe its an actual wan and you would want to enable it.

                        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

                        E 1 Reply Last reply Reply Quote 0
                        • E
                          ErniePantuso @johnpoz
                          last edited by

                          @johnpoz said in None of my firewall rules are working on VLANs:

                          @ErniePantuso . . . And if pfsense didn't pull out rfc1918 from the bogon list you would of broken your network.. Would of remembered then when you changed it ;) hehehe

                          Not necessarily. In the first place, I've never really had the network setup. It's been in an alpha state for months as I slog my way through learning this stuff. And within that framework, I've broken my network and restored pfSense from backed up configurations numerous times - so it could have been any of those and I don't know which! hahaha

                          Bob.DigB 1 Reply Last reply Reply Quote 0
                          • E
                            ErniePantuso @Jarhead
                            last edited by

                            @Jarhead said in None of my firewall rules are working on VLANs:

                            @ErniePantuso You need to read up on rules. They need to be on the interface the traffic originates on. You have a rule on bizvlan with a destination of bizvlan. Not gonna work.
                            You have an any/any rule with other pass rules below it. Not gonna work.
                            If you want to block (or allow) the bizvlan access to LAN, the rule goes on bizvlan.

                            You have no traffic shown on the bizvlan rules. Are you sure you're even connecting to it? Does it get a DHCP address if you connect to it?

                            I'm not a complete idiot. ;D I do have a basic understanding of rules. I understand that any pass rules after the any/any rule are superfluous. I put the any/any rule there as a troubleshooting measure. And I understand that rules for BizVLAN have to go on BizVLAN. My rule on BizVLAN with a destination of BizVLAN subnets was intended to allow nodes on that VLAN to be able to talk to each other. I thought it was blocked otherwise. But I now know that's not correct because I tried disabling ALL the rules on BizVLAN and (with a static IP in that subnet), I can still access my Proxmox server. That confuses the heck out of me!

                            How/where do you see that I have no traffic shown on the bizvlan rules? Am I connected to it? Well, again, with a static IP in that subnet, I can access my Proxmox server - and when I go back to a NetMgmt IP, I can't. That would seem to indicate that I'm connected, wouldn't it? I wasn't worrying yet about DHCP but now that you asked, when I switch my laptop to DHCP, it does not pull an IP address.

                            So what does all that tell me? I keep trying to download an LXC container template from my Proxmox server and it continues to give me a DNS error - even when the only rule on BizVLAN is the pass any/any. If it's allowed to pass any/any, shouldn't that include DNS server(s)?

                            johnpozJ J 2 Replies Last reply Reply Quote 0
                            • johnpozJ
                              johnpoz LAYER 8 Global Moderator @ErniePantuso
                              last edited by

                              @ErniePantuso said in None of my firewall rules are working on VLANs:

                              was intended to allow nodes on that VLAN to be able to talk to each other.

                              Doesn't work like that, but it comes up quite often here to be honest..

                              it does not pull an IP address.

                              This is the big clue that you have something at L2 borked.. If you have a dhcp running and you don't get an IP.. Look to the dhcp server - did it see the discover, and not an IP to hand out is that why? Or did it never get the discover, so your L2 is borked.

                              If dhcp is not working, setting a static isn't going to work either. Unless it was a failure of the actual dhcp server. Again looking to see if you saw discover in the logs.

                              As to your dns error - well yeah if you can't talk to the dns, your never going to get an answer.. Simple check for this is, can you ping your gateway for checking connectivity, can you ping the dns IP if different than your gateway.. Can you do a dns query with nslookup, dig, there are many tools you can use to validate dns is working while at the same time checking the other aspects of your connectivity..

                              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
                              • Bob.DigB
                                Bob.Dig LAYER 8 @ErniePantuso
                                last edited by

                                @ErniePantuso said in None of my firewall rules are working on VLANs:

                                It's been in an alpha state for months as I slog my way through learning this stuff.

                                Learning pfSense and routing and proxmox and virtualization at the same time might be to much for you.

                                1 Reply Last reply Reply Quote 0
                                • J
                                  Jarhead @ErniePantuso
                                  last edited by

                                  @ErniePantuso See the 0/0 B on the left of the rules? That means that rule has never been hit, unless you just rebooted before that pic was taken.
                                  You definitely have a layer 2 problem as John said.

                                  Not trying to say you're an idiot here. Don't take it that way, but you clearly are confused.

                                  Do you realize that setting a static IP doesn't put you on a different network? You have to physically connect to it still.

                                  I never understand why anyone would want a router to run as a VM, it's your main entrance to your network, it should be a separate machine. But if that's what you want, you will have to learn about virtual switches too then. Just guessing you don't have the vSwitch configured correctly which is why you aren't connecting to the vlan.
                                  Start small. Just put an any/any rule on both interface, turn on the DHCP server on both, then connect a device to each and go from there. Once you have both networks working you can then lock them down as needed.

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

                                    @Jarhead said in None of my firewall rules are working on VLANs:

                                    Do you realize that setting a static IP doesn't put you on a different network?

                                    Yeah I brought that up right away - his wording of how he was changing "vlans" was off - just saying he changed his ip?

                                    Running a router as VM can have some advantages - but you better be fairly knowledgeable on what has to be done to do that for vlans or other networks, and fully understand networking to be honest. I ran mine as vm on esxi for a while, and did setup one on proxmox to ship to another location for work.

                                    Proxmox was a bit of learning curve from esxi.

                                    As a vm there are some advantages - I could easy switch from one instance of pfsense to another, so allowed for easy testing of some new version or even other flavors of router distros. Very easy backup with just a snapshot I could roll back too. But they do have some draw backs. To do anything with the vm host my whole network was down. There is a learning curve on how the vm host software handles vlan tags, etc. Which can be different than just your typical vlan switch.

                                    Much better setup when I moved pfsense to hardware for my edge router that is for sure. I still play with different versions of pfsense as VM but they are just on my nas and for testing. If I have to do something with my nas (vm host) my whole network isn't down ;) I wouldn't go back to on a VM as my main router.

                                    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

                                    J 1 Reply Last reply Reply Quote 0
                                    • J
                                      Jarhead @johnpoz
                                      last edited by

                                      @johnpoz Completely agree and I do the same with VM's for testing. Can't beat them for that, too easy to just restore a snapshot when something goes wrong.
                                      But to trust your whole network to a VM, to me that's not very smart. It goes back to the "Just because you can, doesn't mean you should" logic.

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

                                        @Jarhead agree.. There are scenarios where sure it makes sense.. And I can see doing it, there are pro's and cons for sure. Which need to be weighed out..

                                        Personally I wouldn't go back to running my edge on vm ever.. The con's outweigh the pros imho.

                                        And if you are going to run your production edge router/firewall on VM, you should have a really good handle on what that entails.

                                        And if you do run into something where you have a question - first line of your post should be I am running this on VM, here are the details of the setup.

                                        While in this post they do mention proxmox - they do not clearly state that pfsense is on proxmox, etc. For all we know from the first post is their proxmox could just be some other client on the 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.8, 24.11

                                        E 2 Replies Last reply Reply Quote 0
                                        • E
                                          ErniePantuso @johnpoz
                                          last edited by

                                          @johnpoz said in None of my firewall rules are working on VLANs:

                                          @ErniePantuso said in None of my firewall rules are working on VLANs:

                                          it does not pull an IP address.

                                          This is the big clue that you have something at L2 borked..

                                          I understand (I think) that “L2” means “layer 2” but I don’t have a very good understanding of the OSI 7-layer burrito. Are you referring to my switch configuration? That’s entirely possible. I’ll post a screenshot of my switch configuration later.

                                          If you have a dhcp running and you don't get an IP.. Look to the dhcp server - did it see the discover, and not an IP to hand out is that why? Or did it never get the discover, so your L2 is borked.

                                          If dhcp is not working, setting a static isn't going to work either. Unless it was a failure of the actual dhcp server. Again looking to see if you saw discover in the logs.

                                          This may be my biggest problem. When I look at my logs, it’s not clear to me how to read them and/or how to even find the specific entries that are applicable. Can you recommend a good article or YouTube video that could educate me on this?

                                          As to your dns error - well yeah if you can't talk to the dns, your never going to get an answer.. Simple check for this is, can you ping your gateway for checking connectivity, can you ping the dns IP if different than your gateway.. Can you do a dns query with nslookup, dig, there are many tools you can use to validate dns is working while at the same time checking the other aspects of your connectivity..

                                          Thanks, I’ll check on that when I’m back onsite.

                                          @Bob-Dig said in None of my firewall rules are working on VLANs:

                                          Learning pfSense and routing and proxmox and virtualization at the same time might be to much for you.

                                          I’ve been using virtualization since the early days of VMware. I still use VirtualBox regularly. I’m no expert on Docker but I use it frequently and without any major issues. Proxmox is new to me - and while it does seem to be significantly more complex than Docker/VirtualBox/VMware, it doesn’t feel “over my head”. (So far, anyway - if and when I get more deeply into any of the virtual networking stuff, the same gap in my knowledge that’s causing me problems here are likely to trip me up there, too, I’m sure.) All that said, learning pfSense and routing might be too much for me! Hahaha…

                                          @Jarhead said in None of my firewall rules are working on VLANs:

                                          @ErniePantuso See the 0/0 B on the left of the rules? That means that rule has never been hit, unless you just rebooted before that pic was taken.
                                          You definitely have a layer 2 problem as John said.

                                          Not trying to say you're an idiot here. Don't take it that way, but you clearly are confused.

                                          I am indeed confused and no worries - I wasn’t taking offense; I really appreciate all the help. I just wanted to convey that I do have a modicum of knowledge on this stuff.

                                          Do you realize that setting a static IP doesn't put you on a different network? You have to physically connect to it still.

                                          No, I did not realize that, but OTOH, I do have a physical connection. The port that my laptop is connected to is tagged (in my switch configuration) for VLAN 10 (Biz_VLAN). As a further troubleshooting step, I took a port that I wasn’t previously using, tagged it for VLAN 10, moved my cable over, and switched to DHCP. As stated previously, it didn’t pull an IP so I guess it’s looking more and more like a switch problem.

                                          I never understand why anyone would want a router to run as a VM, it's your main entrance to your network, it should be a separate machine. But if that's what you want, you will have to learn about virtual switches too then.

                                          I’m not sure where this came from. I’m not running my router as a VM. Nor is my switch virtualized. Again, I’m not onsite at the moment but when I am, I’ll post a diagram of what I’m working with so that everything is a little more clear.

                                          I want to also note that I’m very committed to learning this and making it work. So much so that I’ve actually purchased the same switch and router for my homelab (I’ll be setting up a Proxmox server at home as well) so that I can work on all this from home as well — but I don’t yet have everything setup at home.

                                          Start small. Just put an any/any rule on both interface, turn on the DHCP server on both, then connect a device to each and go from there. Once you have both networks working you can then lock them down as needed.

                                          Sounds like great advice. At some point, I think I’ve done that (I’m actually very creative and quite good at troubleshooting; I’ve tried dozens of different things and I only turn to help via forums/reddit/etc. when I can’t think of anything else to try) but I think it’s time to go back to square one.

                                          J 1 Reply Last reply Reply Quote 0
                                          • E
                                            ErniePantuso @johnpoz
                                            last edited by

                                            @johnpoz said in None of my firewall rules are working on VLANs:

                                            While in this post they do mention proxmox - they do not clearly state that pfsense is on proxmox, etc. For all we know from the first post is their proxmox could just be some other client on the network.

                                            Ah, now I understand the misconception. That last statement is correct; my Proxmox server is just a client on Biz_VLAN. Once network communication is working, I’ll move on to setting up a Windows file server VM and Active Directory domain controller along with a handful of other containers including Dokuwiki (for documenting all of the IT infrastructure), Kanboard (for project management), a LEMP stack for a couple of internal web apps, a SIEM tool, a backup server, and probably a honeypot in a DMZ (to prove to my 87 year old boss how significant the cybersecurity threats are! “We’ve never had a problem before…..” SMH)

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