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

    RFC 2136 clients wildcard

    2.1 Snapshot Feedback and Problems - RETIRED
    3
    7
    4.0k
    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.
    • C
      CharlieB
      last edited by

      Hi,

      bug or feature?  ;)

      Version:
      2.1-RC1 (amd64)
      built on Tue Sep 3 02:28:04 EDT 2013
      FreeBSD 8.3-RELEASE-p10

      I've setup some RFC 2136 clients, but when i set the Hostname with a wildcard to something like *.example.com i will get the message:
      "The following input errors were detected: The DNS update host name contains invalid characters."

      It would be good if i can tick the AAAA RRs update off because I have a sixxs and a he tunnel with fixed ipv6 but the WAN-Update set the dynamic IPv6 from the ISP.

      Sorry for my bad English reading is much more easy.

      Greets
      CharlieB

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        Wildcards aren't supported there currently.

        I'm not sure what it might take to allow that. It could be as simple as allowing * as a character, or it could be much more complex (e.g. only allowed with a zone key, not a host key, or some other logic)

        If you edit out the input validation from the page and save it, and it actually works, then let us know and we can just relax the input validation.

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • C
          CharlieB
          last edited by

          Thanks for your answer for my first question.

          I have changed the line 633 in /etc/inc/util.inc
          from:
                 ```
          if (preg_match('/^(?:(?:[a-z0-9]|[a-z0-9][a-z0-9-][a-z0-9]).)(?:[a-z0-9]|[a-z0-9][a-z0-9-]*[a-z0-9])$/i', $domain))

          to:
                 ```
          if (preg_match('/^(\*\.)?(?:(?:[a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9])\.)*(?:[a-z0-9]|[a-z0-9][a-z0-9\-]*[a-z0-9])$/i', $domain))
          

          And it works, my update run correct, but i down know about side-effects:
          The function "is_domain" is used in:

          /usr/local/www/vpn_ipsec_phase1.php
          /usr/local/www/vpn_ipsec_mobile.php
          /usr/local/www/wizards/setup_wizard.xml
          /usr/local/www/system.php
          /usr/local/www/services_router_advertisements.php
          /usr/local/www/services_rfc2136_edit.php
          /usr/local/www/services_dyndns_edit.php
          /usr/local/www/services_dnsmasq_edit.php
          /usr/local/www/services_dnsmasq_domainoverride_edit.php
          /usr/local/www/services_dhcpv6.php
          /usr/local/www/services_dhcp.php
          /usr/local/www/services_captiveportal.php
          /usr/local/www/interfaces_ppps_edit.php
          /usr/local/www/interfaces.php
          /usr/local/www/services_dhcp_edit.php

          :(

          Greets
          CharlieB

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            Easy fix though. If it leads with *., chop that off, then feed it to is_domain to check.

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • C
              CharlieB
              last edited by

              Hi,

              in /usr/local/www/services_rfc2136_edit.php I have changed Line 76 I changed
              this:

              if (($_POST['host'] && !is_domain($_POST['host'])))
              

              to:

              if (($_POST['host'] && !is_domain(trim($_POST['host'], '*.'))))
              

              and it works.

              Greets
              CharlieB

              1 Reply Last reply Reply Quote 0
              • jimpJ
                jimp Rebel Alliance Developer Netgate
                last edited by

                No that would trim incorrectly, it would also accept invalid entries like ".example.com" and "*example.com"

                You'd have to test for the substring of the first two chars being *. and if they are there, use the remainder of the string.

                Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

                Need help fast? Netgate Global Support!

                Do not Chat/PM for help!

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

                  Hmm… Wouldn't it be better to have a wildcard CNAME and the register the name that CNAME points to using dyndns?

                  Allowing * in the record to be registered makes the assumption that DNS servers would support it. I think out of the box most DNS servers do not support it.

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