Bind9 Wildcards!

Discussion in 'Server Operation' started by absss, Jun 1, 2009.

  1. absss

    absss New Member

    Hey guys,

    I'm new to these forums and need some help on configuring the dns server bind.

    Basically what i want to accomplish in my local home network is to create a DNS Server that will take ANY request by the user and resolve it to a single IP address (my webserver).

    I have it working properly if you go to a domain such as, it will redirect to my webserver. But it doesnt work if you have file paths in your web address for example By typing that address in the browser, you are sent back what i believe to be an nxdomain error. It cannot find the URL requested with paths.

    zone "." {
            type master;
            file "/etc/bind/db.bhole";
    $TTL    604800
    @       IN      SOA     . root.localhost. (
                                  1         ; Serial
                             604800         ; Refresh
                              86400         ; Retry
                            2419200         ; Expire
                             604800 )       ; Negative Cache TTL
            IN      NS      .
    *.      IN      A ; IP Address of web server
    Im trying to achieve a captive portal type solution with the resources and time frame i have. I don't need the internet to work - i just need to redirect all requests by the user to my webpage.
    Last edited: Jun 1, 2009
  2. absss

    absss New Member

    Solution: The url paths arent read by the dns server and it passes the paths and filenames to the server it resolved to. And seeing those paths and pages probably wont be on the web server youre resolving to, then its sending a 404 error.

    You need to create an error document for 404 errors that redirect to your web server.
    Last edited: Jun 2, 2009

Share This Page