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

    Firewall rules for vlan

    Scheduled Pinned Locked Moved Firewalling
    10 Posts 2 Posters 724 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.
    • P
      Polar_Bear88
      last edited by

      Now that my network is up and running with basic settings, I’m trying to tune the firewall rules to make it more secure on a standard level ready for specific rules in the future for Plex etc.

      I’ve followed a YouTube video by Raid Owl and now have 2 basic rules in the vlans. One which allows any protocol to from the specific vlan to any IP apart from those IPs within an alias that contain all private IPs and a second rule which allows DNS to work.

      As such the devices within the vlan can connect to the internet but not each other and they can’t ping other devices within the vlan either. I’m thinking I should be adding a rule within the HOME vlan and within the IOT vlan to ping (communicate) with each other so that my home network can see my printer, NAS (when built) etc. any reason I shouldn’t be doing this?

      I’m also thinking I won’t need this on my GUEST vlan as those devices only need the internet and no interconnectivity.

      S 1 Reply Last reply Reply Quote 0
      • R rcoleman-netgate moved this topic from L2/Switching/VLANs on
      • S
        SteveITS Galactic Empire @Polar_Bear88
        last edited by

        @Polar_Bear88 I may be misinterpreting what’s written but devices on the same VLAN don’t go through the router so are not affected by firewall rules.

        Going between VLANs does need firewall rules. Auto detection/mDNS may need the avahi package but connecting by IP will work. The firewall on the NAS etc. needs to allow the other subnet.

        Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
        When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
        Upvote 👍 helpful posts!

        P 1 Reply Last reply Reply Quote 0
        • P
          Polar_Bear88 @SteveITS
          last edited by

          @SteveITS
          Since adding the rule my devices in the same vlan can no longer ping each other.

          S 1 Reply Last reply Reply Quote 0
          • S
            SteveITS Galactic Empire @Polar_Bear88
            last edited by

            @Polar_Bear88 I hear what you're saying but that's not how it works. If 10.0.0.2/24 wants to talk to 10.0.0.3/24 it would not send the packet to its gateway. From the firewall's perspective a VLAN is not logically different than a physical interface. Does that block rule show traffic in the column to the left? Maybe show us your rules.

            Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
            When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
            Upvote 👍 helpful posts!

            P 1 Reply Last reply Reply Quote 0
            • P
              Polar_Bear88 @SteveITS
              last edited by

              @SteveITS

              Will do when I next get a chance. At the minute the time I’m getting to play with it is few and far between so may be a while.

              I’ll admit, it’s also entirely possible that as I was tired and it was late at night I could have been mistyping like I sometimes so. In theory I was trying to ping from 10.100.3.5 to 10.100.3.1 (the interface) and to 10.100.3.7 (my iOS device) but that doesn’t mean it’s what I actually typed in.

              1 Reply Last reply Reply Quote 0
              • P
                Polar_Bear88
                last edited by

                I had a chance to go and re-test things and take some screenshots.

                Ive only added the rules to one vlan so far (VLAN HOME) and will roll them out to the other vlans once they're working

                On VLAN HOME I had the following IPs:
                Desktop = 10.100.3.3
                IOS = 10.100.3.6

                I preformed the following ping tests:
                Desktop (10.100.3.3) to Interface (10.100.3.1) = Fail with all packets lost
                Desktop (10.100.3.3) to IOS (10.100.3.6) = Fail with all packets lost
                Desktop (10.100.3.3) to Laptop (192.168.1.1) = Fail with all packets lost as expected
                Desktop (10.100.3.3) to LAN Interface (10.100.3.1) = Fail with all packets lost as expected
                Desktop (10.100.3.3) to 8.8.8.8 = Success
                Desktop (10.100.3.3) to www.google.com = Success

                On VLAN IOT I had the following IPs:
                Laptop = 10.100.5.205
                Device 1 = 10.100.5.3
                Device 1 = 10.100.5.5

                I preformed the following ping tests:
                Laptop (10.100.5.205) to Interface (10.100.5.1) = Success
                Laptop (10.100.5.205) to Device 1 (10.100.5.3) = Success
                Laptop (10.100.5.205) to Device 2 (10.100.5.5) = Success
                Laptop (10.100.5.205) to 8.8.8.8 = Success
                Laptop (10.100.5.205) to www.google.com = Success

                1. VLAN HOME Rules.jpg

                2. Alias .jpg

                3. VLAN IOT Rules.jpg

                S 1 Reply Last reply Reply Quote 0
                • S
                  SteveITS Galactic Empire @Polar_Bear88
                  last edited by

                  @Polar_Bear88 The VLANHOME rules do not allow ICMP to 10.100.3.1, only TCP and UDP for port 53. I don't know why the devices can't ping each other. Is that a wireless network marked as "guest" or "isolate"?

                  Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                  When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                  Upvote 👍 helpful posts!

                  P 1 Reply Last reply Reply Quote 1
                  • P
                    Polar_Bear88 @SteveITS
                    last edited by

                    @SteveITS

                    Ok so the ping to the interface makes sense and I just nee dto add a rule to allow that if I want it to be able to.

                    GUEST will be primarily WIFI but there are hardwired connections such as at my test bench in case I'm connecting an untrusted device but I need internet access. The unifi switches are configured to only allow GUEST on that port. It currently has the same rules as IOT until Ive got all the rules working on 1 VLAN and can copy them accross as required.

                    Hoping someone can weigh in on why devices on the HOME VLAN cant ping each other so I can see where I've configured it wrong

                    S 1 Reply Last reply Reply Quote 0
                    • S
                      SteveITS Galactic Empire @Polar_Bear88
                      last edited by

                      @Polar_Bear88 said in Firewall rules for vlan:

                      why devices on the HOME VLAN cant ping each other

                      Is the subnet mask on each correct? Do the devices have a firewall and is it allowing ICMP?

                      Pre-2.7.2/23.09: Only install packages for your version, or risk breaking it. Select your branch in System/Update/Update Settings.
                      When upgrading, allow 10-15 minutes to restart, or more depending on packages and device speed.
                      Upvote 👍 helpful posts!

                      1 Reply Last reply Reply Quote 0
                      • P
                        Polar_Bear88
                        last edited by

                        Sorry for the very delayed reply, this is the first chance Ive had to do some testing.

                        It now appears as if its working, although please let me know if I'm missing something, and the only thing I've done is that I restarted the router the other day due to some issues with my internet connection.

                        I started off my confirming all subnets and IPs were correct then proceeded with the following tests

                        Desktop 10.100.3.3 255.255.255.0
                        Firestick 10.100.3.5 255.255.255.0
                        Mobile 10.100.3.6 255.255.255.0
                        Tablet 10.100.3.7 255.255.255.0

                        Laptop 192.168.1.21 255.255.255.0

                        Desktop to Firestick SUCCESS
                        Desktop to Mobile SUCCESS
                        Desktop to tablet SUCCESS
                        Desktop to www.google.co.uk SUCCESS
                        Desktop to 8.8.8.8 SUCCESS
                        Desktop to 10.100.3.1 FAIL (as expected)
                        Desktop to Laptop FAIL (as expected)

                        Mobile to Desktop FAIL (Not as expected but research shows this is a windows firewall rule I need to configure)
                        Mobile to Firestick SUCCESS
                        Mobile to Tablet SUCCESS
                        Mobile to www.google.co.uk SUCCESS
                        Mobile to 8.8.8.8 SUCCESS
                        Mobile to 10.100.3.1 FAIL (as expected)
                        Mobile to Laptop FAIL (as expected)

                        Tablet to Desktop FAIL (Not as expected but research shows this is a windows firewall rule I need to configure)
                        Tablet to Firestick SUCCESS
                        Tablet to Mobile SUCCESS
                        Tablet to www.google.co.uk SUCCESS
                        Tablet to 8.8.8.8 SUCCESS
                        Tablet to 10.100.3.1 FAIL (as expected)
                        Tablet to Laptop FAIL (as expected)

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