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.

Possible localhost problem

Discussion in 'General Discussion' started by junglecat, Feb 21, 2005.

  1. junglecat

    junglecat Well-Known Member

    Joined:
    Jul 6, 2004
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    I have a server which is not receiving mail properly, and in trying to troubleshoot, I've discovered something strange.

    In whm, I see this for my primary nameserver:

    ns5.mydomain.com. xxx.66.12.132
    localhost.ns5.mydomain.com. 127.0.0.1

    But in shell I see this in /etc/resolv.conf:

    nameserver xxx.66.18.3
    nameserver xxx.66.12.132
    nameserver xxx.66.12.133


    Now in shell where it says nameserver xxx.66.18.3 shouldn't it say nameserver 127.0.0.1 ?
    xxx.66.18.3 is NOT an ip on my server.

    Could this be the cause of the problem that server has with receiving emails?
     
  2. sawbuck

    sawbuck Well-Known Member

    Joined:
    Jan 18, 2004
    Messages:
    1,367
    Likes Received:
    5
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Resolv.conf should look like this:

    domain "server name"
    search "server name"
    nameserver "Main/Virtual IP of server" (has changed from 127.0.0.1)
    nameserver "Name server IP"
    nameserver "Name server IP"

    Remember to restart Bind/Named
     
  3. junglecat

    junglecat Well-Known Member

    Joined:
    Jul 6, 2004
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    I'm a n00b, I want to make sure I understand.

    Do I edit this:

    nameserver xxx.66.18.3
    nameserver xxx.66.12.132
    nameserver xxx.66.12.133

    to look like this:

    nameserver 127.0.0.1
    nameserver xxx.66.12.132
    nameserver xxx.66.12.133

    Or do I remove that one line so that I am left with only my 2 nameserver ip's like this:

    nameserver xxx.66.12.132
    nameserver xxx.66.12.133
     
  4. DigitalN

    DigitalN Well-Known Member

    Joined:
    Sep 23, 2004
    Messages:
    420
    Likes Received:
    1
    Trophy Points:
    18
    Is correct.

    You don't want 127.0.0.1 within resolv.conf as it is a security risk to do so.

    If the resolver resolves 127.0.0.1 then someone could add say cpan.org to your server as an account, root logs in and downloads a package from cpan (it actually downloads it from the local account on your server, via the account that was added) wham .. you run a trojaned package as root - hacked. Thats the short readers digest version anyways.
     
  5. junglecat

    junglecat Well-Known Member

    Joined:
    Jul 6, 2004
    Messages:
    168
    Likes Received:
    0
    Trophy Points:
    16
    Thank you!

    The mail still isn't being received by the server :( but at least I got that file edited smoothly. :p

    Ok, back to the drawing board.... :confused:
     
Loading...

Share This Page