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

    Firewall rules does not apply to pfsense hosted machine

    Routing and Multi WAN
    2
    16
    1.3k
    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.
    • J
      javamachine
      last edited by javamachine

      I am using pfsense as my home firewall and configured multi-wan setup.

      In addition, I have installed package 'Telegraf ' package for exporting my pfsense stats into InfluxDB, also in 'Telegraf' configuration I have enabled 'Ping Monitor' for 4 different hosts.

      806f96df-4b9b-4167-963c-e2d0fc1d4a6e-image.png

      Since, all ping packets go through the default gateway and I wanted to create separate rule for each ping hosts to forward them manually.

      My goal is to track latency of each gateway/wan so I can complain to my ISP with solid facts lol. Also, I need to track that pings before I play online competitive games, to make sure it does not ruin my game.

      46ce7303-c92a-40bb-802a-e8cca4f0d1dd-image.png

      But these firewall rules does not work. When I start download from my default (UzonlineGW) gateway, in my Grafana stats I can see that ping to all hosts increase equally.

      Also when I traceroute to all 4 hosts from pfsense shell, pfsense uses my default gateway (UzonlineGW).

      My first thought was, it might be because pfsense is not in LAN, but I am not sure about that.

      What am I doing wrong?

      p.s. I am newbie here, sorry if I posted under wrong section of this forum.

      1 Reply Last reply Reply Quote 0
      • R
        Rod-It
        last edited by

        Gateways are monitored out of the box, if you go to status, then gateways you can see each gateway and it's RTT/RTTsd.

        If you want something more comprehensive, go to status, monitoring and configure a WAN monitor for each.

        you can edit the default page or configure new ones using the wrench icon at the top.

        Set left axis to quality and the right box as your WAN you want to monitor, set your desired interval time, 1h 8 hours etc. and choose show advanced, here you can save that configuration and give it a name - ISP1-WAN-8h for example, rinse and repeat for each WAN and configuration you want, then you can simply click them to see the status, this is also logged under, status, system logs, gateways

        R J 2 Replies Last reply Reply Quote 1
        • R
          Rod-It @Rod-It
          last edited by

          If a quick overview of current RTT will do, on the main dashboard page, click the plus sign top right and add the gateways panel, save and all your WANs will show up here right in front of you.

          1 Reply Last reply Reply Quote 1
          • J
            javamachine @Rod-It
            last edited by

            @rod-it That was useful thanks, but I am already using ping monitoring on gateways. Other pings should check other network segments. Let me explain.

            What I want to achieve is to check 3 lines/routes/hosts/idk you name it :)

            1. Ping to my ISP's gateway.
            2. Ping to host that is located in my country (we call it TAS-IX/Center for data networks interaction).
            3. Ping to host that is located outside of my country.

            In that way I can see where the problem is.

            R 1 Reply Last reply Reply Quote 0
            • R
              Rod-It @javamachine
              last edited by

              @javamachine

              But you still need a machine to run those pings, unless your using some type of cron from the PF box itself, meaning your results may be skewed or an issue with the client, not the external side of things.

              Maybe you want to consider traffic shaping to keep specific games as high priority instead?

              J 1 Reply Last reply Reply Quote 1
              • J
                javamachine @Rod-It
                last edited by

                @rod-it I was using Telegraf package to run pings from PF box itself.

                0ab35fa6-6f2d-4ada-bdd5-e11b35f8a0c1-image.png

                1 Reply Last reply Reply Quote 0
                • R
                  Rod-It
                  last edited by

                  Looking at your screenshot above, those rules are not being hit as there are no states on them

                  If you set a ping going to one of those IPs, then run a packet trace within Pfsense, you should find some clues

                  You may want to change your source to LAN net though for those rules, or consider moving those rules to floating if you expect the source to be any network sending the pings.

                  To simplify things, I'd probably create an alias for your 2 IPs for each GW and use those so you only need 1 rule for each and likewise an alias for WOW with each of the 3 ports in, unless you're specifically looking for stats per FW rule

                  Your last rule shows a 3rd GW but you're not interested in pings for this one?

                  J 1 Reply Last reply Reply Quote 1
                  • J
                    javamachine @Rod-It
                    last edited by javamachine

                    @rod-it I have created floating rules as you suggested.

                    df17deb2-fac7-4d16-8748-214d586912b3-image.png

                    Traceroute shows that it is still using my default (UzonlineGW) gateway for all ping hosts.

                    3rd GW is Gateway Group, Where I set priority SKYLINE_PPPOE (Tier 1) over UzonlineGW (Tier 2)

                    1 Reply Last reply Reply Quote 0
                    • R
                      Rod-It
                      last edited by Rod-It

                      Those are showing traffic now, but i would remove your WAN networks from the selected interfaces since oyu only want traffic going out to trigger those rules.

                      If you only have LAN as your internal network, that's all you want in the interface selection for that rule.

                      Having your WAN interfaces selected could be causing your current issue

                      I'd also run a packet capture to see what the traffic is doing, i dont have dual WAN to set it up and test it for you

                      J 1 Reply Last reply Reply Quote 0
                      • J
                        javamachine @Rod-It
                        last edited by

                        @rod-it Oh, I am now deploying vm that will use telegraf (only input.ping). Those packets are coming from that VM :) sorry.

                        1 Reply Last reply Reply Quote 0
                        • R
                          Rod-It
                          last edited by

                          Forget pings for a moment.

                          If you specify 2 different source IPs and set their GWs, clearing any open states in the FW, do they route correctly over their respective WAN?

                          Are there any opens states for the old pings, if so clear the state table and try again

                          J 1 Reply Last reply Reply Quote 0
                          • J
                            javamachine @Rod-It
                            last edited by javamachine

                            @rod-it I will try that later, thanks.

                            But I have found another thing, I have edited telegraf config file and specified source IP where pings should come from. smth like: ping -S 192.168.1.1 xxx.xxx.xxx.155

                            Now pings appear on Diagnostics > States

                            713fe57d-781a-41df-96df-9aad28faf595-image.png

                            But somehow they do not want to obey the firewall rules (0 states/0 B)
                            dddea9ed-0ac7-4861-ba98-aa54f9cb4bc8-image.png

                            1 Reply Last reply Reply Quote 0
                            • R
                              Rod-It
                              last edited by

                              Your first screenshot shows your states from the OZONLINE WAN, you need to remove these from the interfaces on your floating rule. Then your rule can only come from the LAN network, you dont need the WAN networks selected for your use case.

                              You only want traffic going out of your LAN, not the WAN networks, so they do not need to be selected under the floating rule for your case.

                              Your second screenshot, if you're talking about LAN, ignore it, those rules can be disabled/deleted, floating rules are triggered first, so these will never be hit and were not being hit anyway.

                              FYI, I am not a network of firewall guy by any means.

                              J 1 Reply Last reply Reply Quote 1
                              • J
                                javamachine @Rod-It
                                last edited by

                                @rod-it Yeah, I checked the both rules

                                f82b0693-ced1-4eee-8b22-09f421cc34c5-image.png

                                sadly 0/0B here too

                                1 Reply Last reply Reply Quote 0
                                • R
                                  Rod-It
                                  last edited by

                                  I'd start by nailing a single client to each gateway and re-run the pings.

                                  Hover over your destination alias too and check the IPs listed are the one you are pinging.

                                  I'd still get that packet capture running so you can see what is happening, but do make sure you clear the states table otherwise you've already got open connections that will be re-used.

                                  J 1 Reply Last reply Reply Quote 1
                                  • J
                                    javamachine @Rod-It
                                    last edited by

                                    @rod-it okay, got it, thanks.

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