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

    Need help with firewall rules

    Firewalling
    4
    22
    1.7k
    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.
    • M
      macflo1508
      last edited by

      For all you pros out there this is probably a piece of cake, but I can‘t figure this out:
      I have a built in wlan with DHCP running in the 192.168.40.* range and a LAN with DHCP running in the 192.168.20.* range. I need a iPad connected to wlan with IP 192.168.40.101 to be able to access a web GUI running in the LAN network on 192.168.10.5:8088.
      Can someone explain to me how set up whatever firewall rule or port forwarding or NAT is needed to make this work. I tried to Figur it out myself by reading the manual and googling, but I guess I’m to dumb to figure this out.

      Thanks in advance for the help.

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

        @macflo1508 said in Need help with firewall rules:

        this is probably a piece of cake

        Yeah, it's just a simple firewall rule needed. But...

        and a LAN with DHCP running in the 192.168.20.* range. ...
        ...a web GUI running in the LAN network on 192.168.10.5:8088.

        Now what is your LAN range? Both?

        Did you already care that both, client and server, have static IP mappings in the DHCP settings?

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

          Yeah with @viragomann is that a typo?

          Seems like your lan is 192.168.20, which assume is /24 network? But then you mention something running a web gui on 192.168.10.5?

          Are you running a /19?

          Which would put your network on lan as?
          192.168.0.0 - 192.168.31.255

          I take it you don't want this wlan to access anything else in the lan?

          So for example something like this would work..

          rules.png

          There are a few other rules in there to allow access to dns and ntp on pfsense TEST IP in my example.. This would be your wlan address

          And then the 2 rules below that block access to anything else running on the firewall, even the wan IP (to prevent say pfsense webgui access via that IP).. And then the rule with the rfc1918 alias blocks any access to any other vlans you might setup in the future, etc. and would block access to your lan net.

          Then the last rule allows access to the internet.

          Hope that helps - but should really clarify what is your lan network and what I guess is as typo on the 192.168.10.5 address.

          Rules are evaluated top down, first rule to trigger wins, no other rules are evaluated. I have descriptions on this example network I leave setup.. But have any questions ask.

          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

          M 1 Reply Last reply Reply Quote 0
          • M
            macflo1508 @johnpoz
            last edited by

            @johnpoz
            Thank you for the quick help. Sorry; yes that is a typo. The webgui is running at 192.168.20.5
            To further clarify: pfsense is running on a hardware with 6 physical ports and wlan. I have a wan on OPT0, a network with DHCP on OPT1 for NDI signals and Internet, a LAN Network on OPT2 for general purpose Internet and LAN and a Network for DANTE on OPT3 that is completely isolated and should just get DHCP service. OPT1 -OPT3 are connected to a 24 port switch running SwitchOS that I enabled port isolation from each other for all 3 network.
            OPT1 is 192.168.10.*
            OPT2 is 192.168.20*
            OPT3 is 192.168.30*
            WLAN is 192.168.40*
            I need to be able to access a web GUI that is running on a dedicated IP 192.168.20.5:8088 from an iPad, that is connected to WLAn and will get a dynamic IP. I wouldn‘t actually mind if any device on WLAN could connect to devices on LAN.

            Bob.DigB johnpozJ 2 Replies Last reply Reply Quote 0
            • Bob.DigB
              Bob.Dig LAYER 8 @macflo1508
              last edited by Bob.Dig

              @macflo1508 Then show your rules on the interface with 192.168.40.*. It is really easy.

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

                @macflo1508 said in Need help with firewall rules:

                I wouldn‘t actually mind if any device on WLAN could connect to devices on LAN.

                Would really be very interested, what your actual WLAN rule set looks like.

                @johnpoz showed you the rule you need for accessing the WebGUI. Only thing to change is the destination address to 192.168.20.5, because of the typo in your first post.

                So you need a rule like this:
                Interface: WLAN
                protocol: TCP
                source address: 192.168.40.101
                source port: any
                destination address: 192.168.20.5
                destination port: 8088

                If you have a rule to block / reject access to other internal subnets you have to put the new rule above of it.

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

                  @macflo1508 said in Need help with firewall rules:

                  I enabled port isolation from each other for all 3 network.

                  What???

                  So you have vlan capable switch running vlans for those 3 networks? Find to use multiple ulinks.. But they really need to be isolated via vlans on your switch be it pfsense sees tags or not.

                  Port isolation would be for filtering devices in the same L2 from talking to each other.

                  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

                  M 1 Reply Last reply Reply Quote 0
                  • M
                    macflo1508 @johnpoz
                    last edited by

                    @johnpoz
                    No, i didn't configure any vlans on the switch. I i isolated the ports, so it is configured as if they were 3 seperate switches. This was recommended to me because DANTE doesn't like anything else on it's network and NDI on the other hand will always try to load balance if it sees more than one physical connection between to PC's. Might sound a little weird, but it seems to be the only way to keep NDI from using the DANTE Network.

                    1 Reply Last reply Reply Quote 0
                    • M
                      macflo1508
                      last edited by

                      I'm lost....
                      I created the rules as you suggested and it doesn't work. I attached the rules and the log. It looks to me like the log says it passed the traffic, but I get a time out. If I try to connect from a device in the 192.168.20.* range it works fine.WLAN Rules.png Log.png LAN Rules.png

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

                        @macflo1508
                        Possibly the destination device blocks the access from other subnets.
                        If there is a firewall running on the device and you didn't already add any rule to allow the access, this is usually the case.

                        Also consider that your WLAN rules allowe access to any other subnet, since you have copied the default allow rule from LAN.

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

                          There is nothing in the log you posted for your 8088 port like you stated..

                          And how you have the rule is completely pointless.. since right below that you have a rule that says any any..

                          Whatever that is not working has nothing to do with your pfsense rules.

                          As mentioned - look to your device on lan.. Firewall on it? Not using pfsense for gateway. Not listening on port you think its listening on... I don't see any logs to it on any port. But do see that your rule to port 8088 did get hit for a few KBs of traffic that 0/16 on the rule
                          But the issue is not firewall rules on wlan that is for sure.

                          All your blocks your showing there are broadcast traffic - so yeah blocked by default, pfsense would never do anything with said traffic anyway. Thee are ways to not have that logged even if you don't like seeing it.

                          What are you rules on this DANTE interface? You don't allow network to even ping pfsense IP?

                          sense.png

                          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

                          M 1 Reply Last reply Reply Quote 0
                          • M
                            macflo1508 @johnpoz
                            last edited by

                            @johnpoz @johnpoz Still not working as it should. Since I'm really not a firewall expert, I very likely have some pointless stuff in there.
                            The "Allow to any" is the default rule from pfsense to let traffic from OPT1 to OPT0.
                            THe DANTE network doesn't need to do anything outside it's own network, especially no access to internet and it's clock is very delicate. Some people even leave out DHCP and just have fixed IP's and connect the devices to each other through a switch. But DHCP doesn't hurt according to Audinate, so I figured I will give them that. The Dante protocol is for multitrack audio transmission and works with same standards as VOIP.
                            The receiving device on 192.168.20.5 is a Windows 10 computer, which I also tried to disable the firewall, but it still didn't work.
                            Here's the updated rules for the DANTE network, which shouldn't have Internet access and no access to any other network:

                            DANTE Rules.png

                            Anybody have an idea on what to do? I'm willing to pay someone for his time if he can fix this via teamviewer.

                            M 1 Reply Last reply Reply Quote 0
                            • M
                              macflo1508 @macflo1508
                              last edited by

                              Just to be complete, here are all the rules in pfsense. The IP changed to 192.168.40.102, so I changed the rule accordingly.
                              WLAN Rules.png WAN Rules.png NDI Rules.png LAN Rules.png floating rules.png DANTE Rules.png

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

                                Your 8088 rule has no point with those current rules.. Because you have an ANY ANY rule below it..

                                It serves no purpose. The firewall rules are not your problem with whatever issue your having..

                                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

                                M 1 Reply Last reply Reply Quote 1
                                • M
                                  macflo1508 @macflo1508
                                  last edited by

                                  And here's the diagram on how it's wired:
                                  vMix Schema.png

                                  1 Reply Last reply Reply Quote 0
                                  • M
                                    macflo1508 @johnpoz
                                    last edited by

                                    @johnpoz I wouldn't know where else to look...
                                    Thank's for your patience. You are being very helpful and I appreciate it.

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

                                      Well for starters.. Either set that 8088 rule to log so you can actually see traffic that is allowed. Or log all you allowed traffic.

                                      Sniff on pfsense, via the diagnostic menu, packet capture.. Look in your state table.

                                      If you see traffic was sent on to this IP 8080.. And you get no answer, then figure out why. Does the device have a firewall, is it not even listening on 8088? Does it have a different gateway then pfsense, does it have a specific route sending the traffic from that source network to some other gateway?

                                      Looks like to me you have 2 routers, so is where your trying to send traffic even using pfsense as its gateway.

                                      Where is this WLAN on your drawing?

                                      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

                                      M 1 Reply Last reply Reply Quote 0
                                      • M
                                        macflo1508 @johnpoz
                                        last edited by

                                        @johnpoz Thank's again. You pointed me in the right direction: The Windows machine running at 192.168.20.5 has Speedify installed on it, which resulted in the packages being routed to the wrong place. A NAT rule, saying that anything originating from 192.168.40.0/24 should go to LAN adress solved the issue.

                                        NAT.png

                                        Thank's again everybody for being so helpful with a Noob! Great forum!

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

                                          So you did a source nat from what you posted.

                                          So to lan vs looking like it came from 192.168.40, your source natting it to look like it came from pfsense lan IP.

                                          Not exactly clear on what your doing.. But if you have a vlan of 192.168.40, why would you not just want to route to it, vs natting between 2 rfc1918 networks?

                                          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

                                          M 1 Reply Last reply Reply Quote 0
                                          • M
                                            macflo1508 @johnpoz
                                            last edited by

                                            @johnpoz That seems to have been the problem. Because of Speedify the receiver didn't know where the packet was sent from, so the packet was routed to WAN.
                                            I don't have a vlan. The 3 networks (LAN, NDI, DANTE) go to the Mikrotik 24 port switch that has port isolation enabled for ports 1-8 (NDI), Ports 9-16 (LAN) and 17-24 (DANTE). This, according to several people that have a lot of experience with DANTE and NDI, is the best way to keep NDI from using the DANTE network.
                                            If this is better practice than creating vlan's, I don't know, but it seems to work the way it should.

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