Is A record required to be same as PC name?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'm configuring DNS server in linux and cannot understand these things. There is no information in the Internet about them:
Must
A record
be same as PC name? For example, my PC's name isPC1
and in my PC there is a mail server configured with domainexample.com
.
Should my friend (at his office) write in his DNS zone file(zone file for my domain at his office in his linux server)A record
like this:PC1 IN A 192.168.1.125
IN MX PC1.example.com.
Am I right? Or can we put any convenient for us name for A record?Must I create seperate zone files for each domain for sending mails to them from my domain?
dns
add a comment |Â
up vote
0
down vote
favorite
I'm configuring DNS server in linux and cannot understand these things. There is no information in the Internet about them:
Must
A record
be same as PC name? For example, my PC's name isPC1
and in my PC there is a mail server configured with domainexample.com
.
Should my friend (at his office) write in his DNS zone file(zone file for my domain at his office in his linux server)A record
like this:PC1 IN A 192.168.1.125
IN MX PC1.example.com.
Am I right? Or can we put any convenient for us name for A record?Must I create seperate zone files for each domain for sending mails to them from my domain?
dns
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm configuring DNS server in linux and cannot understand these things. There is no information in the Internet about them:
Must
A record
be same as PC name? For example, my PC's name isPC1
and in my PC there is a mail server configured with domainexample.com
.
Should my friend (at his office) write in his DNS zone file(zone file for my domain at his office in his linux server)A record
like this:PC1 IN A 192.168.1.125
IN MX PC1.example.com.
Am I right? Or can we put any convenient for us name for A record?Must I create seperate zone files for each domain for sending mails to them from my domain?
dns
I'm configuring DNS server in linux and cannot understand these things. There is no information in the Internet about them:
Must
A record
be same as PC name? For example, my PC's name isPC1
and in my PC there is a mail server configured with domainexample.com
.
Should my friend (at his office) write in his DNS zone file(zone file for my domain at his office in his linux server)A record
like this:PC1 IN A 192.168.1.125
IN MX PC1.example.com.
Am I right? Or can we put any convenient for us name for A record?Must I create seperate zone files for each domain for sending mails to them from my domain?
dns
asked Jan 23 at 18:36
it dev
244
244
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
2
down vote
accepted
Local hostname and DNS names is a different things. You can type any hostnames at your server (or PC; not matter) and any public DNS names.
But! Some operating systems (Windows especially) can deny access to himself if you try to connect with different names (names that differ from server's hostname). But it is not your case.
There are some things about mail servers:
Is a good practic that your hostname return real MX name with command
hostname -f
Example:
hostname -f
on server returnmail.example.com
; MX record for domainexample.com
point tomail.example.com
Mail server may (and must in most cases) return HELO with valid DNS record:
open example.com 25
Trying 12.34.56.78...
Connected to example.com.
Escape character is '^]'.
220 mail.example.com ESMTP PostfixIP address of mail server must have any ptr record (for good spam reputation) and may have ptr record that resolv to MX record (some "improperly" configured mail servers required strictly accordance of
MX --> A --> IP --> PTR (like A record)
. For example domain:example.com MX --> mail.example.com --> 12.34.56.78 --> mail.example.com
).
thank you for good explanation. Just one question, in your 1st answer, you said that it is a good practic that my hosname return real MX name, no problem that is OK. But, I want to add MX record about other domain's mail server, I know other domain's name, for example: branchoffice.com, I know its IP address, for example 1.2.3.4, but I dont know its PC's hostname. Must I still write MX record in DNS zone file according to PC name? Or should I write just its domain name?
â it dev
Jan 24 at 12:34
branchoffice.com IN A 1.2.3.4
IN MX 2 branchoffice.com
am I right? It doesnt matter what the PC name
â it dev
Jan 24 at 12:36
@it dev, it doesn't matter, you are right. My recommendation may be needed for proper working of mail server (e.g. Postfix can check his own hostname for proper mail delivery - to define thatmail.example.com
is himself. But you can rewrite this behaviour with config/etc/postfix/main.cf
).
â Egor Vasilyev
Jan 24 at 13:12
do you have any messenger id? If yes, can you give me?
â it dev
Jan 24 at 16:16
@it dev, no i haven't
â Egor Vasilyev
Jan 24 at 16:25
add a comment |Â
up vote
3
down vote
No, the hostname
of the machine does not need to be available in DNS.
BUT ... the machine must be able to look itself up. So it is always best to put the local hostname in /etc/hosts
(or equivalent) pointing to a loopback address.
Should that same hostname be a fully qualified domain name, and be in DNS, and pointing to the IP the machine has, well that is OK too. But it isn't required.
FWIW I've just checked my 2 desktops, my Raspberry Pi, and my Linode machines and NONE of the hostnames are in DNS - they are in each machine's /etc/hosts
though, all pointing to 127.0.1.1
or 127.0.0.1
I just want to know the address127.0.1.1
to which it refers?
â k.Cyborg
Jan 23 at 20:45
127.0.0.1
is the loopback address it always refers to the host itself. So each computer on the planet is its own127.0.0.1
â Patrick Mevzek
Jan 24 at 5:26
@ivanivan, well that is OK, the PC name and A record are not required to be the same. But I saw that in some DNS ZONE records, there are written mail, www, ftp IN A and ip address. What they mean? Are that names used as convenience?
â it dev
Jan 24 at 6:05
If some applications get unhappy if 127.0.0.1 is resolvable to a name other than "localhost" or "localhost.localdomain", one workaround is to assign the system hostname to 127.0.1.1 instead. It is also a loopback address, just like 127.0.0.1.
â telcoM
Jan 24 at 9:26
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
Local hostname and DNS names is a different things. You can type any hostnames at your server (or PC; not matter) and any public DNS names.
But! Some operating systems (Windows especially) can deny access to himself if you try to connect with different names (names that differ from server's hostname). But it is not your case.
There are some things about mail servers:
Is a good practic that your hostname return real MX name with command
hostname -f
Example:
hostname -f
on server returnmail.example.com
; MX record for domainexample.com
point tomail.example.com
Mail server may (and must in most cases) return HELO with valid DNS record:
open example.com 25
Trying 12.34.56.78...
Connected to example.com.
Escape character is '^]'.
220 mail.example.com ESMTP PostfixIP address of mail server must have any ptr record (for good spam reputation) and may have ptr record that resolv to MX record (some "improperly" configured mail servers required strictly accordance of
MX --> A --> IP --> PTR (like A record)
. For example domain:example.com MX --> mail.example.com --> 12.34.56.78 --> mail.example.com
).
thank you for good explanation. Just one question, in your 1st answer, you said that it is a good practic that my hosname return real MX name, no problem that is OK. But, I want to add MX record about other domain's mail server, I know other domain's name, for example: branchoffice.com, I know its IP address, for example 1.2.3.4, but I dont know its PC's hostname. Must I still write MX record in DNS zone file according to PC name? Or should I write just its domain name?
â it dev
Jan 24 at 12:34
branchoffice.com IN A 1.2.3.4
IN MX 2 branchoffice.com
am I right? It doesnt matter what the PC name
â it dev
Jan 24 at 12:36
@it dev, it doesn't matter, you are right. My recommendation may be needed for proper working of mail server (e.g. Postfix can check his own hostname for proper mail delivery - to define thatmail.example.com
is himself. But you can rewrite this behaviour with config/etc/postfix/main.cf
).
â Egor Vasilyev
Jan 24 at 13:12
do you have any messenger id? If yes, can you give me?
â it dev
Jan 24 at 16:16
@it dev, no i haven't
â Egor Vasilyev
Jan 24 at 16:25
add a comment |Â
up vote
2
down vote
accepted
Local hostname and DNS names is a different things. You can type any hostnames at your server (or PC; not matter) and any public DNS names.
But! Some operating systems (Windows especially) can deny access to himself if you try to connect with different names (names that differ from server's hostname). But it is not your case.
There are some things about mail servers:
Is a good practic that your hostname return real MX name with command
hostname -f
Example:
hostname -f
on server returnmail.example.com
; MX record for domainexample.com
point tomail.example.com
Mail server may (and must in most cases) return HELO with valid DNS record:
open example.com 25
Trying 12.34.56.78...
Connected to example.com.
Escape character is '^]'.
220 mail.example.com ESMTP PostfixIP address of mail server must have any ptr record (for good spam reputation) and may have ptr record that resolv to MX record (some "improperly" configured mail servers required strictly accordance of
MX --> A --> IP --> PTR (like A record)
. For example domain:example.com MX --> mail.example.com --> 12.34.56.78 --> mail.example.com
).
thank you for good explanation. Just one question, in your 1st answer, you said that it is a good practic that my hosname return real MX name, no problem that is OK. But, I want to add MX record about other domain's mail server, I know other domain's name, for example: branchoffice.com, I know its IP address, for example 1.2.3.4, but I dont know its PC's hostname. Must I still write MX record in DNS zone file according to PC name? Or should I write just its domain name?
â it dev
Jan 24 at 12:34
branchoffice.com IN A 1.2.3.4
IN MX 2 branchoffice.com
am I right? It doesnt matter what the PC name
â it dev
Jan 24 at 12:36
@it dev, it doesn't matter, you are right. My recommendation may be needed for proper working of mail server (e.g. Postfix can check his own hostname for proper mail delivery - to define thatmail.example.com
is himself. But you can rewrite this behaviour with config/etc/postfix/main.cf
).
â Egor Vasilyev
Jan 24 at 13:12
do you have any messenger id? If yes, can you give me?
â it dev
Jan 24 at 16:16
@it dev, no i haven't
â Egor Vasilyev
Jan 24 at 16:25
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
Local hostname and DNS names is a different things. You can type any hostnames at your server (or PC; not matter) and any public DNS names.
But! Some operating systems (Windows especially) can deny access to himself if you try to connect with different names (names that differ from server's hostname). But it is not your case.
There are some things about mail servers:
Is a good practic that your hostname return real MX name with command
hostname -f
Example:
hostname -f
on server returnmail.example.com
; MX record for domainexample.com
point tomail.example.com
Mail server may (and must in most cases) return HELO with valid DNS record:
open example.com 25
Trying 12.34.56.78...
Connected to example.com.
Escape character is '^]'.
220 mail.example.com ESMTP PostfixIP address of mail server must have any ptr record (for good spam reputation) and may have ptr record that resolv to MX record (some "improperly" configured mail servers required strictly accordance of
MX --> A --> IP --> PTR (like A record)
. For example domain:example.com MX --> mail.example.com --> 12.34.56.78 --> mail.example.com
).
Local hostname and DNS names is a different things. You can type any hostnames at your server (or PC; not matter) and any public DNS names.
But! Some operating systems (Windows especially) can deny access to himself if you try to connect with different names (names that differ from server's hostname). But it is not your case.
There are some things about mail servers:
Is a good practic that your hostname return real MX name with command
hostname -f
Example:
hostname -f
on server returnmail.example.com
; MX record for domainexample.com
point tomail.example.com
Mail server may (and must in most cases) return HELO with valid DNS record:
open example.com 25
Trying 12.34.56.78...
Connected to example.com.
Escape character is '^]'.
220 mail.example.com ESMTP PostfixIP address of mail server must have any ptr record (for good spam reputation) and may have ptr record that resolv to MX record (some "improperly" configured mail servers required strictly accordance of
MX --> A --> IP --> PTR (like A record)
. For example domain:example.com MX --> mail.example.com --> 12.34.56.78 --> mail.example.com
).
edited Mar 19 at 11:13
Drakonoved
674518
674518
answered Jan 24 at 7:18
Egor Vasilyev
1,792129
1,792129
thank you for good explanation. Just one question, in your 1st answer, you said that it is a good practic that my hosname return real MX name, no problem that is OK. But, I want to add MX record about other domain's mail server, I know other domain's name, for example: branchoffice.com, I know its IP address, for example 1.2.3.4, but I dont know its PC's hostname. Must I still write MX record in DNS zone file according to PC name? Or should I write just its domain name?
â it dev
Jan 24 at 12:34
branchoffice.com IN A 1.2.3.4
IN MX 2 branchoffice.com
am I right? It doesnt matter what the PC name
â it dev
Jan 24 at 12:36
@it dev, it doesn't matter, you are right. My recommendation may be needed for proper working of mail server (e.g. Postfix can check his own hostname for proper mail delivery - to define thatmail.example.com
is himself. But you can rewrite this behaviour with config/etc/postfix/main.cf
).
â Egor Vasilyev
Jan 24 at 13:12
do you have any messenger id? If yes, can you give me?
â it dev
Jan 24 at 16:16
@it dev, no i haven't
â Egor Vasilyev
Jan 24 at 16:25
add a comment |Â
thank you for good explanation. Just one question, in your 1st answer, you said that it is a good practic that my hosname return real MX name, no problem that is OK. But, I want to add MX record about other domain's mail server, I know other domain's name, for example: branchoffice.com, I know its IP address, for example 1.2.3.4, but I dont know its PC's hostname. Must I still write MX record in DNS zone file according to PC name? Or should I write just its domain name?
â it dev
Jan 24 at 12:34
branchoffice.com IN A 1.2.3.4
IN MX 2 branchoffice.com
am I right? It doesnt matter what the PC name
â it dev
Jan 24 at 12:36
@it dev, it doesn't matter, you are right. My recommendation may be needed for proper working of mail server (e.g. Postfix can check his own hostname for proper mail delivery - to define thatmail.example.com
is himself. But you can rewrite this behaviour with config/etc/postfix/main.cf
).
â Egor Vasilyev
Jan 24 at 13:12
do you have any messenger id? If yes, can you give me?
â it dev
Jan 24 at 16:16
@it dev, no i haven't
â Egor Vasilyev
Jan 24 at 16:25
thank you for good explanation. Just one question, in your 1st answer, you said that it is a good practic that my hosname return real MX name, no problem that is OK. But, I want to add MX record about other domain's mail server, I know other domain's name, for example: branchoffice.com, I know its IP address, for example 1.2.3.4, but I dont know its PC's hostname. Must I still write MX record in DNS zone file according to PC name? Or should I write just its domain name?
â it dev
Jan 24 at 12:34
thank you for good explanation. Just one question, in your 1st answer, you said that it is a good practic that my hosname return real MX name, no problem that is OK. But, I want to add MX record about other domain's mail server, I know other domain's name, for example: branchoffice.com, I know its IP address, for example 1.2.3.4, but I dont know its PC's hostname. Must I still write MX record in DNS zone file according to PC name? Or should I write just its domain name?
â it dev
Jan 24 at 12:34
branchoffice.com IN A 1.2.3.4
IN MX 2 branchoffice.com
am I right? It doesnt matter what the PC nameâ it dev
Jan 24 at 12:36
branchoffice.com IN A 1.2.3.4
IN MX 2 branchoffice.com
am I right? It doesnt matter what the PC nameâ it dev
Jan 24 at 12:36
@it dev, it doesn't matter, you are right. My recommendation may be needed for proper working of mail server (e.g. Postfix can check his own hostname for proper mail delivery - to define that
mail.example.com
is himself. But you can rewrite this behaviour with config /etc/postfix/main.cf
).â Egor Vasilyev
Jan 24 at 13:12
@it dev, it doesn't matter, you are right. My recommendation may be needed for proper working of mail server (e.g. Postfix can check his own hostname for proper mail delivery - to define that
mail.example.com
is himself. But you can rewrite this behaviour with config /etc/postfix/main.cf
).â Egor Vasilyev
Jan 24 at 13:12
do you have any messenger id? If yes, can you give me?
â it dev
Jan 24 at 16:16
do you have any messenger id? If yes, can you give me?
â it dev
Jan 24 at 16:16
@it dev, no i haven't
â Egor Vasilyev
Jan 24 at 16:25
@it dev, no i haven't
â Egor Vasilyev
Jan 24 at 16:25
add a comment |Â
up vote
3
down vote
No, the hostname
of the machine does not need to be available in DNS.
BUT ... the machine must be able to look itself up. So it is always best to put the local hostname in /etc/hosts
(or equivalent) pointing to a loopback address.
Should that same hostname be a fully qualified domain name, and be in DNS, and pointing to the IP the machine has, well that is OK too. But it isn't required.
FWIW I've just checked my 2 desktops, my Raspberry Pi, and my Linode machines and NONE of the hostnames are in DNS - they are in each machine's /etc/hosts
though, all pointing to 127.0.1.1
or 127.0.0.1
I just want to know the address127.0.1.1
to which it refers?
â k.Cyborg
Jan 23 at 20:45
127.0.0.1
is the loopback address it always refers to the host itself. So each computer on the planet is its own127.0.0.1
â Patrick Mevzek
Jan 24 at 5:26
@ivanivan, well that is OK, the PC name and A record are not required to be the same. But I saw that in some DNS ZONE records, there are written mail, www, ftp IN A and ip address. What they mean? Are that names used as convenience?
â it dev
Jan 24 at 6:05
If some applications get unhappy if 127.0.0.1 is resolvable to a name other than "localhost" or "localhost.localdomain", one workaround is to assign the system hostname to 127.0.1.1 instead. It is also a loopback address, just like 127.0.0.1.
â telcoM
Jan 24 at 9:26
add a comment |Â
up vote
3
down vote
No, the hostname
of the machine does not need to be available in DNS.
BUT ... the machine must be able to look itself up. So it is always best to put the local hostname in /etc/hosts
(or equivalent) pointing to a loopback address.
Should that same hostname be a fully qualified domain name, and be in DNS, and pointing to the IP the machine has, well that is OK too. But it isn't required.
FWIW I've just checked my 2 desktops, my Raspberry Pi, and my Linode machines and NONE of the hostnames are in DNS - they are in each machine's /etc/hosts
though, all pointing to 127.0.1.1
or 127.0.0.1
I just want to know the address127.0.1.1
to which it refers?
â k.Cyborg
Jan 23 at 20:45
127.0.0.1
is the loopback address it always refers to the host itself. So each computer on the planet is its own127.0.0.1
â Patrick Mevzek
Jan 24 at 5:26
@ivanivan, well that is OK, the PC name and A record are not required to be the same. But I saw that in some DNS ZONE records, there are written mail, www, ftp IN A and ip address. What they mean? Are that names used as convenience?
â it dev
Jan 24 at 6:05
If some applications get unhappy if 127.0.0.1 is resolvable to a name other than "localhost" or "localhost.localdomain", one workaround is to assign the system hostname to 127.0.1.1 instead. It is also a loopback address, just like 127.0.0.1.
â telcoM
Jan 24 at 9:26
add a comment |Â
up vote
3
down vote
up vote
3
down vote
No, the hostname
of the machine does not need to be available in DNS.
BUT ... the machine must be able to look itself up. So it is always best to put the local hostname in /etc/hosts
(or equivalent) pointing to a loopback address.
Should that same hostname be a fully qualified domain name, and be in DNS, and pointing to the IP the machine has, well that is OK too. But it isn't required.
FWIW I've just checked my 2 desktops, my Raspberry Pi, and my Linode machines and NONE of the hostnames are in DNS - they are in each machine's /etc/hosts
though, all pointing to 127.0.1.1
or 127.0.0.1
No, the hostname
of the machine does not need to be available in DNS.
BUT ... the machine must be able to look itself up. So it is always best to put the local hostname in /etc/hosts
(or equivalent) pointing to a loopback address.
Should that same hostname be a fully qualified domain name, and be in DNS, and pointing to the IP the machine has, well that is OK too. But it isn't required.
FWIW I've just checked my 2 desktops, my Raspberry Pi, and my Linode machines and NONE of the hostnames are in DNS - they are in each machine's /etc/hosts
though, all pointing to 127.0.1.1
or 127.0.0.1
answered Jan 23 at 20:01
ivanivan
3,1291213
3,1291213
I just want to know the address127.0.1.1
to which it refers?
â k.Cyborg
Jan 23 at 20:45
127.0.0.1
is the loopback address it always refers to the host itself. So each computer on the planet is its own127.0.0.1
â Patrick Mevzek
Jan 24 at 5:26
@ivanivan, well that is OK, the PC name and A record are not required to be the same. But I saw that in some DNS ZONE records, there are written mail, www, ftp IN A and ip address. What they mean? Are that names used as convenience?
â it dev
Jan 24 at 6:05
If some applications get unhappy if 127.0.0.1 is resolvable to a name other than "localhost" or "localhost.localdomain", one workaround is to assign the system hostname to 127.0.1.1 instead. It is also a loopback address, just like 127.0.0.1.
â telcoM
Jan 24 at 9:26
add a comment |Â
I just want to know the address127.0.1.1
to which it refers?
â k.Cyborg
Jan 23 at 20:45
127.0.0.1
is the loopback address it always refers to the host itself. So each computer on the planet is its own127.0.0.1
â Patrick Mevzek
Jan 24 at 5:26
@ivanivan, well that is OK, the PC name and A record are not required to be the same. But I saw that in some DNS ZONE records, there are written mail, www, ftp IN A and ip address. What they mean? Are that names used as convenience?
â it dev
Jan 24 at 6:05
If some applications get unhappy if 127.0.0.1 is resolvable to a name other than "localhost" or "localhost.localdomain", one workaround is to assign the system hostname to 127.0.1.1 instead. It is also a loopback address, just like 127.0.0.1.
â telcoM
Jan 24 at 9:26
I just want to know the address
127.0.1.1
to which it refers?â k.Cyborg
Jan 23 at 20:45
I just want to know the address
127.0.1.1
to which it refers?â k.Cyborg
Jan 23 at 20:45
127.0.0.1
is the loopback address it always refers to the host itself. So each computer on the planet is its own 127.0.0.1
â Patrick Mevzek
Jan 24 at 5:26
127.0.0.1
is the loopback address it always refers to the host itself. So each computer on the planet is its own 127.0.0.1
â Patrick Mevzek
Jan 24 at 5:26
@ivanivan, well that is OK, the PC name and A record are not required to be the same. But I saw that in some DNS ZONE records, there are written mail, www, ftp IN A and ip address. What they mean? Are that names used as convenience?
â it dev
Jan 24 at 6:05
@ivanivan, well that is OK, the PC name and A record are not required to be the same. But I saw that in some DNS ZONE records, there are written mail, www, ftp IN A and ip address. What they mean? Are that names used as convenience?
â it dev
Jan 24 at 6:05
If some applications get unhappy if 127.0.0.1 is resolvable to a name other than "localhost" or "localhost.localdomain", one workaround is to assign the system hostname to 127.0.1.1 instead. It is also a loopback address, just like 127.0.0.1.
â telcoM
Jan 24 at 9:26
If some applications get unhappy if 127.0.0.1 is resolvable to a name other than "localhost" or "localhost.localdomain", one workaround is to assign the system hostname to 127.0.1.1 instead. It is also a loopback address, just like 127.0.0.1.
â telcoM
Jan 24 at 9:26
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f419159%2fis-a-record-required-to-be-same-as-pc-name%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password