Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Wed Sep 13, 2017 5:27 am 

Joined: Wed Sep 13, 2017 4:35 am
Posts: 1

So i'm running Debian 9 on one server that serves a website and is also used for email.

When it comes to setting up hosts, hostname, etc, I'm getting irritated by all the info out there specifically for setting it all up with the server itself, the ip address, the webserver, dns records, postfix, opendkim, etc.
I have read the Linode guides, and also other guides, but I'm getting consfused as they are all slightly different everytime. So my understanding (of my current setup is):

DNS points to the one single IP to all registered domains. So lets say I have a fictional domain called '', and my finctional Linode provided IP is 139.123.345.99 (IPv6 is omitted for now) my DNS entries are:

DNS Manager ยป

(primary dns) --- (email) ---

(nameserver) --- (subdomain) --- --- --- --- ---

(mailserver) --- (preference) --- 10

(hostname) --- (ipaddress)
--- 139.123.345.99
www --- 139.123.345.99
mail --- 139.123.345.99

I have the IPv6 parts too, but omitted from here for now. I have email specific spf, dmarc, adsp and dkip in the TXT part and nothing in the SRV part.

In my hosts file in /etc/hosts, I might have any or all of these in it: localhost, alpha, eidanwebbb, localhost.localdomain.

So what ones do I REALLY need? I also may want to separate my applications onto different servers at a later date too. So I might have more than one server, the email might run on it's own server, the webserver might be on another, so I might separate and But maybe that confuses stuff for me for now.

Three files are involved:


==== localhost alpha alpha.eidanwebbb

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback alpha alpha.eidanweb
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

multi on


So here are my thoughts attempts to answer my own questions:
Do I need localhost? yes, because the computer itself needs to have a sense of self
Can I have eidanwebbb or alpha? eidanwebbb to signify it's an external server of mine that I SSH into from my local laptop at home but also to help me know it's on the edianwebbb domain (whether it's .com or .net). Do I need alpha too? yes? because if i add another server and move email to it in the future it might be named 'bertie' and eidanwebbb and localhost. Does eidanwebbb become the domain then? So it's alpha.eidanwebbb localhost.eidanwebbb www.eidanwebbb, and mail.eidanwebbb... do i need to add the TLD to it?,
So alpha becomes a subdomain in the DNS way of looking.
What becomes my FQDN?

And now onto the nightmare that is Postfix... Actually, I'll leave that for now.
So I've written a lot here, and all I'm looking for is some basic pointers or guidelines.

Thanks a lot for reading, I look forward to the answers.

PostPosted: Wed Sep 20, 2017 11:06 pm 
Senior Member

Joined: Wed Oct 20, 2004 8:55 am
Posts: 148
This is a basic overview. Some of this stuff you may already know.

/etc/hosts is for resolving names when the request comes from the local host (the computer you are logged into)
You're logged in to your linode over ssh / LISH and you type ping
- /etc/host is used to work out the ip address of
- If it doesn't exist in /etc/hosts, your linode may (depending on setup) then search the DNS.

DNS is for resolving names for computers external to your computer.
You're at home on your computer and you type ping
- Your computers host file is used to work out the ip address of - doesn't find it and then
- Your ISP's DNS is used to work out the IP address of

Essentially your linode will have only one hostname. Same as you only have one first name.
This host name will be part of one of your domains (if you have more than one)

Postfix will want the hostname and domain name of you server. This will also be in /etc/hosts.

These may help you out:

Display posts from previous:  Sort by  
Post new topic  Reply to topic

Who is online

Users browsing this forum: No registered users and 8 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group