Not using a fqdn for server hosts file

3 posts / 0 new
Last post
#1 Fri, 09/29/2017 - 16:02
adamjedgar

Not using a fqdn for server hosts file

I was installing a new webmin/virtualmin instance last nite and i suddenly got to thinking, is it really necessary on a web hosting server to set fqdn in hosts file for the vps server itself if its not being also used as a nameserver, and does not have its own website on the main webmin install html directory?

If one is just hosting other peoples websites using virtualmin virtual servers and they are pointing at this using an A record at their registrar, why would we want the server itself resolvable in hosts file by fqdn in terms of a domain.com instead of just ip address and the default like that i have below?

The default on google cloud is hostname.googlecloudaccountname.internal

Would i even need to change this under above mentioned circumstances?

Would my not changing the google cloud default affect other servers on the gce instance in webmin, like mail or ftp for clients and their virtualmin virtual server accounts?

Fri, 09/29/2017 - 20:25
Joe
Joe's picture

If you're sending or receiving mail, having a FQDN is the easiest way to get all of the various pieces for myorigin, myhostname, etc. right.

"The default on google cloud is hostname.googlecloudaccountname.internal"

This would cause problems for sending and receiving mail, though you can't send mail from Google Cloud instances, anyway...you have to use a mail forwarder like sendgrid, or whatever. So, less of an issue there.

So...if you're hosting DNS, or sending/receiving email, you want a FQDN configured in all the relevant places (including hosts). It is generally not necessary if you are hosting your DNS and email elsewhere.

Note that the above name would not trigger the Virtualmin installer's FQDN test, so it would let you install with that hostname. It doesn't have a list of all valid public TLDs, so it assumes if the system has a name with a dot in it, it is fully qualified (with some exceptions like having "localhost" in the name). So, Virtualmin will install on a GCE instance without forcing a name change. Though, again, you won't be able to host mail on a GCE because they block the necessary ports.

--

Check out the forum guidelines!

Sun, 10/01/2017 - 14:18 (Reply to #2)
adamjedgar

Ah i see...that has affirmed my thinking. Now you have also touched on exactly my next problem...i have setup my hosts file with a fqdn, although google cloud keeps bloody changing it on me so i have to have 2 entries in the hosts file which seems to overcome this as my own one is added up the list order... anyway, i can recieve mail but i cannot send mail. So if i install whmcs for example, and configure it to allow purchasing of webhosting by potential clients, the welcome email they are supposed to recieve with username and password never arrives in their personal email (ie gmail,hotmail,yahoomail etc).

When you say this doesnt work on google cloud, do you mean that the fix is to simply open the ports they have blocked and it will work, or do we really have to relay mail through another provider? Do amazon and azure also block the ability to send mail like this?

I was sure that i have been able to send mail on google cloud compute instances with vestacp or ispconfig (i will have to recheck this now)

EDIT.... This appears to be the solution although i have only just found it and not yet gone through the tutorial...in early part it says we can send mail from gcc, but that it must not be from port 25 (so a different port needs to be used)

https://cloud.google.com/compute/docs/tutorials/sending-mail

AJECreative is the home of $5 webhosting, $15/month VPS servers (1cpu,1gb RAM, 25GB storage)
Centos7, Debian9, or Ubuntu18LTS
Available Control Panels = Centos-Webpanel, Cyberpanel, or Virtualmin

https://ajecreative.com.au

Topic locked