Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Dual NIC - /etc/hosts

  1. #1
    reza is offline Junior Member
    Join Date
    Mar 2008
    Posts
    8
    Rep Power
    7

    Default Dual NIC - /etc/hosts

    Hello,

    What should the /etc/hosts include when the server has dual NIC? IP addresses of both of the NIC's aliased to the same machine? So if the mail server is mailhost.domain.com, should it be:

    127.0.0.1 localhost.localdomain localhost
    123.45.111 mailhost.domain.com # eth0
    123.45.112 mailhost.domain.com # eth1

    Thanks,
    --
    Reza

  2. #2
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,016
    Rep Power
    24

    Default

    What are you attempting to achieve with the two NICs ? Are they bonded together ? Primary and Standby ? Plugged into the same switch or different ones ? Need a bit more information please

  3. #3
    Bill Brock is offline Outstanding Member
    Join Date
    May 2007
    Location
    Oklahoma
    Posts
    703
    Rep Power
    8

    Default

    I run two NIC's, one on the internal LAN and one on the Internet. I have both IP in my hosts file.

    The hosts file is checked before your system goes to it's designated DNS server(s). In reality, if your IP's are resolved through external DNS, they don't even need to be in the hosts file.

    One way to do it would be to have your external NIC resolve via DNS and your internal via the hosts file.

  4. #4
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,016
    Rep Power
    24

    Default

    Quote Originally Posted by Bill Brock View Post
    The hosts file is checked before your system goes to it's designated DNS server(s).
    only if your /etc/nsswitch.conf is at defaults. This can be overridden.

    Why not just run a DNS with internal and external views ? That would sort it out then.

    One further thing, if you mailserver is compromised having it dual connected that way creates a nice route into your internal network (unless the internal is also in a DMZ)
    Last edited by uxbod; 03-28-2008 at 07:44 AM.

  5. #5
    Bill Brock is offline Outstanding Member
    Join Date
    May 2007
    Location
    Oklahoma
    Posts
    703
    Rep Power
    8

    Default

    In ten years, never had a mail server compromised. And all have run with internal and external NIC's and resolution handled as in my post. I would hope one would have a secure machine if he open's it to the Internet - secure passwords, tight firewall, etc. But everyone has their own preferred way to do it.

    I hope when I post behind you you would not take it as a personal attack. I'm just trying to give back to the community. :-)

  6. #6
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,016
    Rep Power
    24

    Default

    Indeed we all are Bill

    Though some people are at a different level of knowledge, and perhaps may just plug their cables straight into the outside world without locking everything down It was more of a re-iteration about security.

    Both methods of resolution will work just fine, and it also depends on whether you are running a caching server aswell.

    For us to fully answer we need more information about the setup as per my first post

    Also, http://www.zimbra.com/forums/announc...r-profile.html please

  7. #7
    reza is offline Junior Member
    Join Date
    Mar 2008
    Posts
    8
    Rep Power
    7

    Default

    Thanks for the replies; we aren't attempting anything yet. The new box which will be the mail server is a dual core, dual NIC rack server so maybe a better question to ask is what would be the best use of the dual NICs? Machine is secure, it's a Debian behind a firewall, no extra services running etc. DNS is external, won't be having DNS running on the mail server.

    We figured to maybe have one of the NIC's IP to be IMAP/POP and the other as SMTP? Is that possible? Any other better uses?

    Thanks,
    --
    Reza

  8. #8
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,016
    Rep Power
    24

    Default

    If your switch can handle it why not just bond the two ? Dependant on how you are doing you backups you could have a seperate backup LAN. That way when you do backups to another system it will not effect the bandwidth of your mail stream.

  9. #9
    reza is offline Junior Member
    Join Date
    Mar 2008
    Posts
    8
    Rep Power
    7

    Default

    Switch can't handle bonding the two NICs.

    Thanks,
    --
    Reza

  10. #10
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,016
    Rep Power
    24

    Default

    What speed are the NICs going to be connected to the switch ? If at a gig then you shall be hard pushed to max them out with email and web traffic IMHO. As Bill has said you could have one facing internal and the other external. Are the NICs onboard or seperate cards ?

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Please fix your /etc/hosts file...
    By ipguru99 in forum Administrators
    Replies: 24
    Last Post: 07-02-2012, 08:34 PM
  2. Replies: 11
    Last Post: 02-09-2008, 08:00 AM
  3. Broken /etc/hosts
    By mevets in forum Installation
    Replies: 1
    Last Post: 06-26-2007, 11:40 PM
  4. Zimbra on dual processor
    By soumen74 in forum Administrators
    Replies: 3
    Last Post: 02-24-2007, 11:25 PM
  5. Debian /etc/hosts ERROR
    By mjfleck2000 in forum Installation
    Replies: 2
    Last Post: 02-07-2006, 11:50 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •