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

    PfSense changes subnet in the nat rules!!

    Scheduled Pinned Locked Moved General pfSense Questions
    22 Posts 3 Posters 1.9k Views 3 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.
    • G Offline
      Gianluca 0 @stephenw10
      last edited by

      @stephenw10 It all started when I changed some Nat rules which have TCP / UDP protocols with TCP. Pfsense changed all other rules with TCP / UDP from single host in destination address to network with subnet / 31. When I have some time I will install a VM with Pfsense version 2.5.2 and restore my configuration and try to replicate the problems.

      1 Reply Last reply Reply Quote 0
      • stephenw10S Offline
        stephenw10 Netgate Administrator
        last edited by

        What I mean is did you see those changes to all the other rules reflected in the config diffs. Or could it be a display issue?
        And you saw this on other NAT rules? I assume port forwards? Or the associated firewall rules?

        Steve

        johnpozJ G 2 Replies Last reply Reply Quote 0
        • johnpozJ Online
          johnpoz LAYER 8 Global Moderator @stephenw10
          last edited by

          This makes no sense at all.. And sure can not duplicate the problem in 2.5.2 per how I am understanding what your saying the problem is.

          I created 3 test rules all using tcp/udp.. You can see the gui rules, and what the actual rules are. I then changed one of those rules to tcp only.. All looks normal to me..

          test.jpg

          Am I not understanding what your problem is - screenshots showing exactly what your saying the problem is would be most helpful.

          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

          G 2 Replies Last reply Reply Quote 0
          • G Offline
            Gianluca 0 @stephenw10
            last edited by

            @stephenw10 I haven't checked yet inside the diffs configuration, but I presume that inside I can see the changes. And yes, the issue is reflected in other Nat rules not connected with that I changed.

            1 Reply Last reply Reply Quote 0
            • G Offline
              Gianluca 0 @johnpoz
              last edited by

              @johnpoz you did this in a clean install, we are using the same setup we started about 5 years ago.

              1 Reply Last reply Reply Quote 0
              • G Offline
                Gianluca 0 @johnpoz
                last edited by

                @johnpoz try to see inside the rules in network, and look if it has been changed to /31. In the list of Nat Rules is not always showing the subnet changed.

                johnpozJ 1 Reply Last reply Reply Quote 0
                • stephenw10S Offline
                  stephenw10 Netgate Administrator
                  last edited by

                  Mmm, I can't replicate it either.

                  That is what you're doing though? On your system making that change to one port forward changed all of them and set the destination to /31?

                  G 1 Reply Last reply Reply Quote 0
                  • G Offline
                    Gianluca 0 @stephenw10
                    last edited by Gianluca 0

                    @stephenw10 in all rules that have TCP/UDP, Pfsense change only the destination network subnet to /31, I repeat, previously configured has singles host, to network address /31.

                    1 Reply Last reply Reply Quote 0
                    • stephenw10S Offline
                      stephenw10 Netgate Administrator
                      last edited by

                      If it's actually set to a /31 subnet it will show as that there:

                      Screenshot from 2021-09-28 14-15-02.png

                      Are you sure this is not your browser auto-fill setting some fields when you edit the rule?

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

                        @gianluca-0 said in PfSense changes subnet in the nat rules!!:

                        try to see inside the rules in network

                        Those are the wan rules.. Here our the nat rules

                        natrules.jpg

                        Yes this is a clean install of 2.5.2.. Sorry don't have a 5 year old test setup that I have kept updating over the years ;) heheh

                        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 2
                        • G Offline
                          Gianluca 0 @stephenw10
                          last edited by

                          @stephenw10 yes :) I'm sure..I understand what you're meaning. And autofill can not change from single host to network address and also change subnet to /31 (I think).

                          G 1 Reply Last reply Reply Quote 0
                          • G Offline
                            Gianluca 0 @Gianluca 0
                            last edited by

                            anyway, I need some time to build a new Pfsense virtual machine and restore my configuration, so see what happened. Pfsense is not owned by us, we have a manager user but we cannot log in with ssh for example.

                            1 Reply Last reply Reply Quote 0
                            • stephenw10S Offline
                              stephenw10 Netgate Administrator
                              last edited by

                              There is something slightly odd there in 2.5.2/21.05.1. If you set the destination as network the list of subnet sizes includes /32 and also /31 twice!

                              nat-rule-subnet.jpg

                              However selecting them doesn't seen to cause a problem. And it's fixed in 2.6/21.09.

                              Steve

                              G johnpozJ 2 Replies Last reply Reply Quote 0
                              • G Offline
                                Gianluca 0 @stephenw10
                                last edited by

                                @stephenw10 but that Nat rules are single hosts, so / 32 is implied.

                                1 Reply Last reply Reply Quote 0
                                • stephenw10S Offline
                                  stephenw10 Netgate Administrator
                                  last edited by

                                  Exactly. If you set /32 there it just goes back to single host. It should not appear in that list as a 'network' but selecting it does no harm.

                                  Steve

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

                                    @stephenw10 said in PfSense changes subnet in the nat rules!!:

                                    If you set the destination as network the list of subnet sizes includes /32 and also /31 twice!

                                    Where are you seeing this? Looking on nat and firewalls - I do not see that

                                    natfirewall.jpg

                                    Oh I see it on 21.05.1 but not my test 2.5.2 box..

                                    But only in the nat, not firewall rules..

                                    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
                                    • stephenw10S Offline
                                      stephenw10 Netgate Administrator
                                      last edited by

                                      Yeah, I was testing in 21.05.1. I assume it would affect both. Hmm.

                                      Either way it's fixed in 21.09 so...

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

                                        @stephenw10 said in PfSense changes subnet in the nat rules!!:

                                        Either way it's fixed in 21.09 so...

                                        Which should be released any day ;) Since only a couple of days left in September (Month 9) hehehe..

                                        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
                                        • First post
                                          Last post
                                        Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.