The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Bind - How do i not listen on an ip?

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

  1. JamieH

    JamieH Member

    Joined:
    Aug 16, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    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,475
    Likes Received:
    20
    Trophy Points:
    38
    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
     
  3. JamieH

    JamieH Member

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

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    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.
     
  5. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    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.
     
Loading...

Share This Page