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

    Ignore any IP not resolving to a trusted domaine

    Scheduled Pinned Locked Moved Firewalling
    33 Posts 2 Posters 3.4k Views 2 Watching
    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.
    • johnpozJ Online
      johnpoz LAYER 8 Global Moderator @Wastapi
      last edited by

      @wastapi see where it says source any - change that to single and put in your alias..

      example here is one of mine

      single.jpg

      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 25.07.1 | Lab VMs 2.8, 25.07.1

      W 1 Reply Last reply Reply Quote 0
      • W Offline
        Wastapi @johnpoz
        last edited by Wastapi

        @johnpoz ok I see! Great! You really helped me there.

        1-Can I add multiple Aliases as source? Comma separated? Or it is preferable to have one rule per alias should I have multiple for other more granular usage?

        2-Where do I control how often the pfsense DNS is updating the resolution of my FQDN domains in my Alias?
        Where are the setup for this?

        Thanks!

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

          @wastapi by default it updates every 5 minutes.. Which really should be fine for such a thing..

          as to multiple aliases in same rule, I don't think so.. You can use the same alias in multiple rules. And you can sort of nest some alias types into a bigger one.

          But always better to be granular as possible if you ask me.

          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 25.07.1 | Lab VMs 2.8, 25.07.1

          W 1 Reply Last reply Reply Quote 0
          • W Offline
            Wastapi @johnpoz
            last edited by Wastapi

            @johnpoz Ok, will look into this.

            Just to be clear as I am doing these changes over my Open VPN connection (not onsite now). I don't want to be locked out and have to drive to office! ;)

            • I define these dyndns fqdn Aliases as HOSTS right? like in my original screenshot.
            • And in my WAN rule (which comes from the OpenVPN VPN wizard), I replace the SOURCE to Alias with my alias as you did
            • as for the Destination I leave it like this?
              Screen Shot 2021-11-12 at 11.21.00.png

            Thanks!

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

              @wastapi well to make sure you don't lock yourself out... You could always create a rule that allows your current IP to the gui directly from the IP... That way you would be able to get in, even if you mess up your vpn access, etc.

              I always put in some sort of out of band access when doing anything that could lock me out ;)

              Also good check is put that alias into some dummy rule, so it gets evaluated. Alias do not get resolved unless in a rule.. And then check your tables under diagnostic to make sure the IPs are in there for those fqdn..

              example

              table.jpg

              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 25.07.1 | Lab VMs 2.8, 25.07.1

              W 1 Reply Last reply Reply Quote 0
              • W Offline
                Wastapi @johnpoz
                last edited by

                @johnpoz
                mmm. Right. not sure how this rule should be performed though.
                Sorry for the Newbe stuff. 🙄 :/

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

                  @wastapi what rule a gui access rule? Just allow on your wan to wan address on port your gui is running on, and then the IP your currently coming from as source..

                  Validate that works before you mess with your vpn rule.

                  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 25.07.1 | Lab VMs 2.8, 25.07.1

                  W 1 Reply Last reply Reply Quote 0
                  • W Offline
                    Wastapi @johnpoz
                    last edited by

                    @johnpoz
                    Sure! But then how will I test that my new alias setup is working as I now have a rule that allows my IP through anyway?

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

                      @wastapi -- look in the table to make sure its showing the IPs, etc.

                      Your other rule is for vpn, not direct access to the web gui via the wan IP.. Completely different modes of connecting..

                      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 25.07.1 | Lab VMs 2.8, 25.07.1

                      W 1 Reply Last reply Reply Quote 0
                      • W Offline
                        Wastapi @johnpoz
                        last edited by Wastapi

                        @johnpoz Yes, but as I am on the same IP, the VPN still works. So even disabling the Open VPN rule does allow me to connect as the IP is allowed 100%.

                        So I guess I should limit the ports on the new temporary rule to JUST allow the 80 port for the GUI? Or other ports too?

                        Thanks!

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

                          @wastapi huh?? Create your web gui port rule and access it.. via your public IP, you wouldn't be going down the vpn to get ot your pfsense wan IP..

                          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 25.07.1 | Lab VMs 2.8, 25.07.1

                          W 1 Reply Last reply Reply Quote 0
                          • W Offline
                            Wastapi @johnpoz
                            last edited by

                            @johnpoz Ok so I should understand from your last reply that the temporary IP assigned "Web GUI rule" should not be on all ports (.) but only 443?

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

                              @wastapi is your web gui using 443, then yeah.. Mine uses 8443 for example..

                              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 25.07.1 | Lab VMs 2.8, 25.07.1

                              W 1 Reply Last reply Reply Quote 1
                              • W Offline
                                Wastapi @johnpoz
                                last edited by

                                WOHOOOO!!! It works! :) :)
                                Thanks a lot @johnpoz !

                                1 Reply Last reply Reply Quote 0
                                • W Offline
                                  Wastapi
                                  last edited by

                                  @johnpoz
                                  I have an issue. It seems that ANY IP can connect to the open VPN now, even if they are NOT in the alias pool.

                                  I have put the said rule on my WAN interface.
                                  Should I also put it on my openvpn interface?

                                  I would have expected my WAN to simply block it if not in the alias pool, and for the traffic NOT to reach the open VPN because of that.

                                  Thanks for your continued help.

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

                                    @wastapi without seeing your rules I really can not even guess to what could be going on.

                                    But you can validate what is in the alias via the diagnostic / table menu. For something to talk to your openvpn service listening on your wan IP.. You would need a rule on your wan to allow it. The rules in your openvpn interface would be for what traffic is allowed via that interface - not for connecting to it from wan.

                                    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 25.07.1 | Lab VMs 2.8, 25.07.1

                                    1 Reply Last reply Reply Quote 0
                                    • W Offline
                                      Wastapi
                                      last edited by Wastapi

                                      Thanks for pointing diagnostic / table menu

                                      1-Well we have another issue then:
                                      It seems that an IP was added in the table although it has absolutely NO link to ANY domain in my Alias configuration. Any clue?

                                      2-And here is my rule on my WAN interface
                                      Screen Shot 2021-11-22 at 11.31.04.png

                                      3-And here is my rule on my OpenVPN (Which is not an interface)
                                      Screen Shot 2021-11-22 at 11.32.26.png

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

                                        @wastapi that is not your rules that is 1 rule - without knowing what rules above that, or in floating its just a guess if that rule is the one that will be trigged.

                                        Lets see your wan rules..

                                        example..

                                        wanrules.jpg

                                        And do you have rules in floating - if so lets see them.. Also what do you have set for your port forward "Filter rule association"

                                        asso.jpg

                                        If you have that set to PASS vs an association with your wan rule - you could be allowing anything in, etc.

                                        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 25.07.1 | Lab VMs 2.8, 25.07.1

                                        W 1 Reply Last reply Reply Quote 0
                                        • W Offline
                                          Wastapi @johnpoz
                                          last edited by Wastapi

                                          @johnpoz

                                          • l only have ONE allow rule on my WAN. The one I sent.
                                          • I only have ONE allow rule on my OpenVPN. The one I sent.
                                          • I have a few rules on my Bridge interface, but this should not be related. Also none refer to this Alias setup.

                                          No floating rules are currently defined
                                          Nothing found about port forward "Filter rule association"

                                          On my WAN I have the standard "Block bogon networks" & "Block private networks" blocking rules at the top.

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

                                            @wastapi said in Ignore any IP not resolving to a trusted domaine:

                                            Nothing found about port forward "Filter rule association"

                                            Ah my bad this openvpn running, not a port forward - you can ignore that..

                                            Well how exactly are you saying anything can connect are you logging that rule that allows your openvpn, are you seeing connection attempts in the vpn log?

                                            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 25.07.1 | Lab VMs 2.8, 25.07.1

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