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

    bug in web interface for bind package

    Scheduled Pinned Locked Moved pfSense Packages
    17 Posts 6 Posters 1.3k 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.
    • A
      aligator638
      last edited by

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • A
        aligator638 @bmeeks
        last edited by

        @bmeeks

        named.conf is rewritten from the xml file every time you save, so it should not be edited manually.

        1 Reply Last reply Reply Quote 0
        • A
          aligator638 @johnpoz
          last edited by

          @johnpoz very odd, I removed the entries, checked named.conf was ok. Retyped everything, and my ^M are back.

          bmeeksB 1 Reply Last reply Reply Quote 0
          • bmeeksB
            bmeeks @aligator638
            last edited by bmeeks

            @aligator638 said in bug in web interface for bind package:

            @johnpoz very odd, I removed the entries, checked named.conf was ok. Retyped everything, and my ^M are back.

            In my previous post, I was talking about typing in any text input box in the pfSense GUI, not editing a file directly on the system. So if you are "pasting" something into a text box in the GUI, and that pasted text contains Windows or DOS line ending sequences, this ^M problem will show up.

            So when you say "typed", do you mean only typing from the keyboard, or are you perhaps pasting in something from elsewhere into the GUI text box? I'm not a user of bind on pfSense, but I assume it has a place for the user to manually enter certain things into the configuration by typing or pasting text into one or more text boxes or text input areas in the GUI screens. If Windows or DOS line endings get copied into those GUI text boxes, they will get saved into the XML and then subsequently written out to the named.conf or any other file generated at runtime by the pfSense system.

            How do I know this can happen? Because I fought it for some time in the code I wrote for the Snort and Suricata packages.

            A 1 Reply Last reply Reply Quote 0
            • A
              aligator638 @bmeeks
              last edited by

              @bmeeks sorry, I re-TYPED everything, not cut and paste. And as explained in previous posts, this happens in all the custom fields in this package.

              1 Reply Last reply Reply Quote 0
              • A
                aligator638
                last edited by

                Checked the main xml file and decoded the saved text (it is base64)

                cmVjdXJzaW9uIG5vOw0KYWxsb3ctdHJhbnNmZXIgeyBub25lOyB9Ow0KYmluZGtleXMtZmlsZSAiL2V0Yy9uYW1lZC9iaW5kLmtleXMiOw==

                ==>>

                recursion no;
                allow-transfer { none; };
                bindkeys-file "/etc/named/bind.keys";

                No ^M characters in the xml file. So these characters are added when the data is saved into named.conf

                1 Reply Last reply Reply Quote 0
                • S
                  serbus
                  last edited by

                  Hello!

                  What are you using to view the named.conf after adding custom options with the web gui? e.g. "ssh in with putty on windows and cat the named.conf" , or "Diagnostics -> Edit File in the gui", etc...

                  John

                  Lex parsimoniae

                  A 1 Reply Last reply Reply Quote 0
                  • A
                    aligator638 @serbus
                    last edited by

                    @serbus very interesting comment John, in vi (ssh), I can see the ^M, but not with the GUI editor, just to check I selected into the editor, and copied that data back into vi again, no ^M

                    1 Reply Last reply Reply Quote 0
                    • R
                      retaichraq123 Banned
                      last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • R
                        retaichraq123 Banned
                        last edited by

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