Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Bind - How do i not listen on an ip?

Discussion in 'Bind/DNS/Nameserver' started by JamieH, Nov 4, 2004.

  1. JamieH

    JamieH Member

    Joined:
    Aug 16, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    151
    I currently have over 10 IPs on my server, id like for all of them except 1 IP to listen via BIND.



    How :) ?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    22
    Trophy Points:
    463
    Location:
    Go on, have a guess
    From man named.conf:
    Here's the syntax for listen-on:

    [ listen-on [ port ip_port ] { address_match_list }; ]

    And here's a thread that will help you with ACL's:
    http://forums.cpanel.net/showthread.php?t=15922
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. JamieH

    JamieH Member

    Joined:
    Aug 16, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    151
    =\ Im going to need some sample config plz :(
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    22
    Trophy Points:
    463
    Location:
    Go on, have a guess
    Here you go:

    Edit /etc/named.conf and at the top put:
    Code:
    options {
            listen-on {11.22.33.44;};
    };
    
    Where 11.22.33.44 should be replaced with the IP address you want to run BIND on. Then reload the configuration with:

    rndc reconfig

    and check /var/log/messages for an errors. You can tell if it has worked with:

    netstat -lpn | grep named

    This should only show the IP address you specified.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    22
    Trophy Points:
    463
    Location:
    Go on, have a guess
    Just realised that you want all but one. In that case you'd list them in turn like this:
    Code:
    options {
            listen-on {11.22.33.44; 11.22.33.45; 11.22.33.47;};
    };
    
    Be very careful to include all the semicolons.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice