LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-23-2011, 09:50 PM   #1
loveulinux
Member
 
Registered: Aug 2011
Posts: 68

Rep: Reputation: Disabled
DNS resolves only on server


Hi..All,
I configured DNS server at my home on RedHat 6 EL, and I am able to resolve hostname to IP address from only on DNS(RHEL6) server using nslookup, host, dig commands.
host ns.kadalur.com
ns.kadalur.com has address 192.168.0.5

nslookup ubuntu.kadalur.com
Server: 192.168.0.5
Address: 192.168.0.5#53

Name: ubuntu.kadalur.com
Address: 192.168.0.1

dig xp.kadalur.com

; <<>> DiG 9.7.0-RedHat-9.7.0-1.el6 <<>> xp.kadalur.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 14318
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;xp.kadalur.com. IN A

;; ANSWER SECTION:
xp.kadalur.com. 86400 IN A 192.168.0.7

;; AUTHORITY SECTION:
kadalur.com. 86400 IN NS ns.kadalur.com.

;; ADDITIONAL SECTION:
ns.kadalur.com. 86400 IN A 192.168.0.5

But it is not resolving from clients even I have mentioned the DNS entries in the /etc/resolv.conf file as
search ns.kadalur.com
nameserver 192.168.0.5


Note: RHEL 6 is installed in virtual Box on the primary O/S(Ubuntu 11.04). I have not connected network cable, and from both side server-->client, client-->server is pinging. I selected bridged mode to eth0 and assigned the static IP addresses to each clients. I am able to ping and also able to ssh, ftp, etc from one machine to other.Please have look with these config files and please let me know if I have made any mistakes. The server IP address 192.168.0.5
PHP Code:
[B]/etc/named.conf[/B]
options {
        
listen-on port 53 127.0.0.1192.168.0.5; };
        
listen-on-v6 port 53 { ::1; };
        
directory       "/var/named";
        
dump-file       "/var/named/data/cache_dump.db";
        
statistics-file "/var/named/data/named_stats.txt";
        
memstatistics-file "/var/named/data/named_mem_stats.txt";
        
allow-query     localhost192.168.0.0; };
        
recursion yes;

        
dnssec-enable yes;
        
dnssec-validation yes;
        
dnssec-lookaside auto;

/* Path to ISC DLV key */
        
bindkeys-file "/etc/named.iscdlv.key";
};

logging {
        
channel default_debug {
                
file "data/named.run";
                
severity dynamic;
        };
};

zone "." IN {
        
type hint;
        
file "named.ca";
};

include 
"/etc/named.rfc1912.zones";

zone "kadalur.com" in {
        
type master;
file "kadalur.com";
        
allow-update none; };
};

zone "0.168.192.in-addr.arpa" in {
        
type master;
        
file "0.168.192.in-addr.arpa";
        
allow-update none; };
}; 
zone files are located in /var/named/chroot/var/named and created soft links to these files under /var/named
Code:
ls -l /var/named
total 32
lrwxrwxrwx. 1 root  root    50 Oct 23 11:03 0.168.192.in-addr.arpa -> /var/named/chroot/var/named/0.168.192.in-addr.arpa
drwxr-x---. 6 named named 4096 Aug 28 18:10 chroot
drwxrwx---. 2 named named 4096 Oct 23 11:36 data
drwxrwx---. 2 named named 4096 Oct 24 07:40 dynamic
lrwxrwxrwx. 1 root  root    39 Oct 23 11:03 kadalur.com -> /var/named/chroot/var/named/kadalur.com
-rw-r-----. 1 named named 1892 Feb 18  2008 named.ca
-rw-r-----. 1 named named  152 Dec 15  2009 named.empty
-rw-r-----. 1 named named  152 Jun 21  2007 named.localhost
-rw-r-----. 1 named named  168 Dec 15  2009 named.loopback
drwxrwx---. 2 named named 4096 Feb 17  2010 slaves
PHP Code:
[B]cat kadalur.com [/B]
$TTL    1d
kadalur
.com.  IN    SOA   ns.kadalur.comroot.kadalur.com. (
    
2010031902 se serial number
    3h         
ref refresh
    15m        
ret update retry
    3w         
ex expiry
    3h         
min minimum
    
)

    
IN    NS    ns.kadalur.com.
ns         IN    A    192.168.0.5
www        IN    A    192.168.0.5
ftp        IN    A    192.168.0.5
xp         IN    A    192.168.0.7
ubuntu     IN    A    192.168.0.1
cent       IN     A    192.168.0.3
mail       IN    A    192.168.0.5 
PHP Code:
[B]cat 0.168.192.in-addr.arpa[/B]
$TTL    1d
@   IN    SOA   ns.kadalur.comroot.kadalur.com. (
    
2010031902 se serial number
    3h         
ref refresh
    15m        
ret update retry
    3w         
ex expiry
    3h         
min minimum
    
)
    
    
IN    NS    ns.kadalur.com.
5     IN    PTR    ns.kadalur.com.
5     IN    PTR    www.kadalur.com.
5     IN    PTR    ftp.kadalur.com.
7     IN    PTR    xp.kadalur.com.
1     IN    PTR    ubuntu.kadalur.com.
3     IN    PTR    cent.kadalur.com.
5     IN    PTR    kadalur.com.
5     IN    PTR    mail.kadalur.com
PHP Code:
[B]cat /etc/resolv.conf [/B]
search ns.kadalur.com.
nameserver 192.168.0.5 
PHP Code:
[B]route -n[/B]
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    
Use Iface
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth0
0.0.0.0         192.168.0.5     0.0.0.0         UG    0      0        0 eth0 
So please let me know why it is not resolving from clients even I have give gateway and dns as 192.168.0.5 in the client machine.

Last edited by Tinkster; 10-23-2011 at 10:28 PM.
 
Old 10-23-2011, 10:38 PM   #2
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 210Reputation: 210Reputation: 210
Hi there,

What is the output of these commands, on the client side (from ubuntu.kadalur.com)?

Code:
dig @192.168.0.5 xp.kadalur.com.
vs. just

Code:
dig xp.kadalur.com.

Last edited by jhwilliams; 10-23-2011 at 10:39 PM.
 
1 members found this post helpful.
Old 10-23-2011, 11:46 PM   #3
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
The way I see it
check your
Code:
 named.conf
Code:
allow-query     { localhost; 192.168.0.0; };
should be like this

Code:
allow-query     { localhost; 192.168.0.0/24; };
 
1 members found this post helpful.
Old 10-24-2011, 12:04 AM   #4
loveulinux
Member
 
Registered: Aug 2011
Posts: 68

Original Poster
Rep: Reputation: Disabled
DNS resolves only on server

Hi..Thank you both, I came to office now, I will let you know once I reach to home in the evening. As you said, it seems the problem is from allow-query. I will check it, after adding "192.168.0.0/24" and let you know. Thanks.


Quote:
Originally Posted by deep27ak View Post
The way I see it
check your
Code:
 named.conf
Code:
allow-query     { localhost; 192.168.0.0; };
should be like this

Code:
allow-query     { localhost; 192.168.0.0/24; };
 
Old 10-24-2011, 10:24 AM   #5
loveulinux
Member
 
Registered: Aug 2011
Posts: 68

Original Poster
Rep: Reputation: Disabled
DNS resolves only on server

Hi..I added an entry as "allow-query { localhost; 192.168.0.0/24; };" in /etc/named.conf file. But still I am unable to resolve from client side. and also not able to resolve for kadalur.com in server itself.
Note: my PC is having only one NIC, and it is not connected with network cable. Although I am able to ssh, telnet from one PC to other. Should the network cable be connected for DNS? Please see the below dig output.

dig @192.168.0.5 xp.kadalur.com--->from cent o/s

; <<>> DiG 9.7.0-P2-RedHat-9.7.0-5.P2.el6_0.1 <<>> @192.168.0.5 xp.kadalur.com
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached

dig xp.kadalur.com--->from cent o/s

; <<>> DiG 9.7.0-P2-RedHat-9.7.0-5.P2.el6_0.1 <<>> xp.kadalur.com
;; global options: +cmd
;; connection timed out; no servers could be reached

It is not working even I have given gateway and DNS as 192.168.0.1, please see the below gateway and resolv.conf file.

route -n-->cent o/s
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
0.0.0.0 192.168.0.5 0.0.0.0 UG 0 0 0 eth2

cat /etc/resolv.conf -->cent o/s
search ns.kadalur.com.
nameserver 192.168.0.5

XP machine
ipconfig /all
Windows IP Configuration

Host Name . . . . . . . . . . . . : computer_1
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Unknown
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . : ns.kadalur.com.

Ethernet adapter Local Area Connection:

Connection-specific DNS Suffix . : ns.kadalur.com.
Description . . . . . . . . . . . : AMD PCNET Family PCI Ethernet Adapter
Physical Address. . . . . . . . . : 08-00-27-FC-5D-55
Dhcp Enabled. . . . . . . . . . . : No
IP Address. . . . . . . . . . . . : 192.168.0.7
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.0.5
DNS Servers . . . . . . . . . . . : 192.168.0.5

C:\>nslookup www.kadalur.com
Can't find server name for address 192.168.0.5: Timed out
*** Default servers are not available
*** Request to UnKnown timed-out
DNS request timed out.
timeout was 2 seconds.
Server: UnKnown
Address: 192.168.0.5

DNS request timed out.
timeout was 2 seconds.
DNS request timed out.
timeout was 2 seconds.


And also added the entry to /etc/hosts file in the DNS server as below, but still it is not resolving from any of the clients.
cat /etc/hosts-->Server RHEL 6
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.0.5 kadalur.com redhat
192.168.0.3 cent.kadalur.com cent
192.168.0.1 ubuntu.kadalur.com ubuntu
192.168.0.7 xp.kadalur.com xp

But dig, nslookup, host commands resolving with IP address in only DNS server apart from kadalur.com.
host kadalur.com--->No output
echo $?
0

dig @localhost kadalur.com--from server

; <<>> DiG 9.7.0-RedHat-9.7.0-1.el6 <<>> @localhost kadalur.com
; (2 servers found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 54980
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;kadalur.com. IN A

;; AUTHORITY SECTION:
kadalur.com. 10800 IN SOA ns.kadalur.com. root.kadalur.com. 2010031902 10800 900 1814400 10800

;; Query time: 1 msec
;; SERVER: ::1#53(::1)
;; WHEN: Mon Oct 24 20:32:39 2011
;; MSG SIZE rcvd: 73

nslookup kadalur.com---from server
Server: 192.168.0.5
Address: 192.168.0.5#53

*** Can't find kadalur.com: No answer

host www.kadalur.com---from server
www.kadalur.com has address 192.168.0.5

host ubuntu.kadalur.com---from server
ubuntu.kadalur.com has address 192.168.0.1

nslookup cent.kadalur.com---from server

Server: 192.168.0.5
Address: 192.168.0.5#53

Name: cent.kadalur.com
Address: 192.168.0.3

dig xp.kadalur.com---from server

; <<>> DiG 9.7.0-RedHat-9.7.0-1.el6 <<>> xp.kadalur.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 48165
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;xp.kadalur.com. IN A

;; ANSWER SECTION:
xp.kadalur.com. 86400 IN A 192.168.0.7

;; AUTHORITY SECTION:
kadalur.com. 86400 IN NS ns.kadalur.com.

;; ADDITIONAL SECTION:
ns.kadalur.com. 86400 IN A 192.168.0.5

;; Query time: 1 msec
;; SERVER: 192.168.0.5#53(192.168.0.5)
;; WHEN: Mon Oct 24 20:50:37 2011
;; MSG SIZE rcvd: 81

Please help me, since my RHCE training, I am facing difficulties in configuring DNS and DDNS.










Quote:
Originally Posted by jhwilliams View Post
Hi there,

What is the output of these commands, on the client side (from ubuntu.kadalur.com)?

Code:
dig @192.168.0.5 xp.kadalur.com.
vs. just

Code:
dig xp.kadalur.com.

Last edited by loveulinux; 10-26-2011 at 09:23 PM. Reason: correction
 
Old 10-25-2011, 12:20 AM   #6
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Ok that really meshed me up
Now you said that you have RHEL6 server on virtual box then where did this centOS come from, the one you have mentioned?

Try addding these lines in your named.conf
Code:
view localhost_resolver {
        match-clients      { localhost; 192.168.0.0/24; };
        match-destinations { localhost; 192.168.0.0/24; };
        recursion yes;
and restart the server

and can you post the output of named.rfc1912.zones
Code:
#cat named.rfc1912.zone
other of your issues that kadalur.com is not replying because you have not made any such entry in your forward zone

add this line

Code:
kadalur.com.     IN   A   192.168.0.5
and check
 
1 members found this post helpful.
Old 10-25-2011, 12:49 PM   #7
loveulinux
Member
 
Registered: Aug 2011
Posts: 68

Original Poster
Rep: Reputation: Disabled
DNS resolves only on server

Hi..Thank you very much, you are guiding me a lot.
Ubuntu 11.04(192.168.0.1) is the primary operating system and rest of all the O/S
(cent O/S 6(192.168.0.3)
RedHat EL 6(192.168.0.5)
Windows XP(192.168.0.7)
comes in oracle VM virtualbox which is installed on the ubuntu O/S and the DNS is configured in RHEL 6.
I showed an entry for kadalur.com in zone files, Thank you very much, now it is resolving from only server but not from any of the client for any of the query. As you said I added these below four lines in /etc/named.conf file under
options {
listen-on port 53 { 127.0.0.1; 192.168.0.5; };
listen-on-v6 port 53 { ::1; };
view localhost_resolver {
match-clients { localhost; 192.168.0.0/24; };
match-destinations { localhost; 192.168.0.0/24; };
recursion yes;

and restarted the service found the error as below.
service named restart
Stopping named: [ OK ]
Starting named:
Error in named configuration:
/etc/named.conf:13: unknown option 'view'
/etc/named.conf:32: unknown option 'logging'
/etc/named.conf:39: unknown option 'zone'
/etc/named.rfc1912.zones:13: unknown option 'zone'
/etc/named.rfc1912.zones:19: unknown option 'zone'
/etc/named.rfc1912.zones:25: unknown option 'zone'
/etc/named.rfc1912.zones:31: unknown option 'zone'
/etc/named.rfc1912.zones:37: unknown option 'zone'
/etc/named.conf:46: unknown option 'zone'
/etc/named.conf:52: unknown option 'zone'
/etc/named.conf:58: '}' expected near end of file
[FAILED]
Then I added "};" in end of the view localhost_resolver section and restarted found error as below
service named restart
Stopping named: [ OK ]
Starting named:
Error in named configuration:
/etc/named.conf:13: unknown option 'view'
[FAILED]
tail /var/log/messages
Oct 25 23:06:17 ananth named: /etc/named.rfc1912.zones:37: unknown option 'zone'
Oct 25 23:06:17 ananth named: /etc/named.conf:46: unknown option 'zone'
Oct 25 23:06:17 ananth named: /etc/named.conf:52: unknown option 'zone'
Oct 25 23:06:17 ananth named: /etc/named.conf:58: '}' expected near end of file
Oct 25 23:07:44 ananth named: /etc/named.conf:13: unknown option 'view'
Oct 25 23:15:15 ananth named: /etc/named.conf:13: unknown option 'view'
Oct 25 23:16:00 ananth named: /etc/named.conf:13: unknown option 'view'
Oct 25 23:16:31 ananth named: /etc/named.conf:13: unknown option 'view'
Oct 25 23:16:44 ananth named: /etc/named.conf:13: unknown option 'view'
Oct 25 23:17:09 ananth named: /etc/named.conf:13: unknown option 'view'

Here is the /etc/named.rfc1912zone file contents
Quote:
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
// and http://www.ietf.org/internet-drafts/...l-zones-02.txt
// (c)2007 R W Franks
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

zone "localhost.localdomain" IN {
type master;
file "named.localhost";
allow-update { none; };
};

zone "localhost" IN {
type master;
file "named.localhost";
allow-update { none; };
file "named.localhost";
allow-update { none; };
};

zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "named.loopback";
allow-update { none; };
};

zone "1.0.0.127.in-addr.arpa" IN {
type master;
file "named.loopback";
allow-update { none; };
};

zone "0.in-addr.arpa" IN {
type master;
file "named.empty";
allow-update { none; };
};
Please help me, what may be the wrong?

Last edited by loveulinux; 10-25-2011 at 09:13 PM. Reason: correction
 
Old 10-25-2011, 09:40 PM   #8
loveulinux
Member
 
Registered: Aug 2011
Posts: 68

Original Poster
Rep: Reputation: Disabled
DNS resolves only on server

Please help me deep27ak
 
Old 10-26-2011, 09:25 PM   #9
loveulinux
Member
 
Registered: Aug 2011
Posts: 68

Original Poster
Rep: Reputation: Disabled
DNS resolves only on server

Please help me masters.
 
Old 10-26-2011, 11:37 PM   #10
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by loveulinux View Post
Please help me deep27ak
Sorry for replying late
since yesterday was diwali so I was on leave

returning back to your DNS everything looks fine except your named.conf and named.rfc1912.zones

here is what you need to do

Code:
(I suppose you have already done this)
#yum -y install caching-nameserver

#cp named.caching-nameserver  named.conf
Code:
#vi named.conf
options {
        listen-on port 53 { 127.0.0.1; 192.168.0.5; };
        listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        query-source    port 53;
        query-source-v6 port 53;
        allow-query     { localhost; 192.168.0.0/24; };
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
view localhost_resolver {
        match-clients      { localhost; 192.168.0.0/24; };
        match-destinations { localhost; 192.168.0.0/24; };
        recursion yes;
        include "/etc/named.rfc1912.zones";
Code:
#vi named.rfc1912.zones
(add these lines)
zone "kadalur.com" in {
        type master;
file "kadalur.com";
        allow-update { none; };
};

zone "0.168.192.in-addr.arpa" in {
        type master;
        file "0.168.192.in-addr.arpa";
        allow-update { none; };
};
Code:
#vi /etc/sysconfig/network-scripts/ifcfg-eth0
peerdns no

Code:
#chown root:named kadalur.com
#chown root:named 0.168.192.in-addr.arpa
in your centos server and RHEL6
check your resolv.conf

Code:
#vi /etc/resolv.conf
search kadalur.com
nameserver 192.168.0.5
If you are doing this for your personal practice then try turning off your firewall
Code:
#iptables -F
#service iptables stop

or else post the output of your iptables
#iptables -L
Code:
check your selinux
#cat /etc/sysconfig/selinux
SELINUX=disabled


few things you need to check
when you use your DNS 192.168.0.5 in your XP, does it resolves the nameserver and can you use your internet properly?
your DNS and gateway are same so if possible use any other IP on RHEL6 for DNS server and give it a try
 
1 members found this post helpful.
Old 10-27-2011, 11:51 AM   #11
loveulinux
Member
 
Registered: Aug 2011
Posts: 68

Original Poster
Rep: Reputation: Disabled
DNS resolves only on server

Hi...deep27ak, Thanks for the reply. You are really genius. I did not find named.caching-nameserver file anywhere. I searched using
find . / -name named.caching-nameserver
find . / -name caching-nameserver
rpm -ql bind | grep named.caching-nameserver
rpm -ql bind | grep caching-nameserver

Then I installed caching-nameserver in cent O/S 6 instead rhel6 after removing bind(old package). In cent O/S also I did not find named.caching-nameserver file. Then I thought of just copy-paste your configurations and this time I changed only gateway as 192.168.0.1(ubuntu/primary O/S) in each and every machine including DNS server and restarted named service. Then I used dig, nslookup, host commands from ubuntu, cent os,
wow it is resolving with IP address in each and every machine including window XP even I have not given any of the hosts IPs in neither server's /etc/hosts file nor client /etc/hosts file. Then thought of using ssh username@fqdn from one machine to other, wow I am able to every machine. And browsed ftp://kadalur.com, kadalur.com, mail.kadalur.com from every machine. Super everything is working fine with FQDN. Thank you very much I really hats off to you.
nslookup 192.168.0.7
Server: 192.168.0.3
Address: 192.168.0.3#53

7.0.168.192.in-addr.arpa name = xp.kadalur.com.

nslookup ubuntu.kadalur.com
Server: 192.168.0.3
Address: 192.168.0.3#53

Name: ubuntu.kadalur.com
Address: 192.168.0.1

host kadalur.com
kadalur.com has address 192.168.0.3

Can you please help me in configure MX records in zone files. Because I have given as
mail IN A 192.168.0.3--------------->kadalur.com file.
3 IN PTR mail.kadalur.com.------->0.168.192.in-addr.arpa file. I think this may be wrong because I can remember that it should be something "MX"
Please excuse me, I spoiled your valuable lot of time with this.

Last edited by loveulinux; 10-27-2011 at 11:52 AM. Reason: correction
 
Old 10-27-2011, 11:02 PM   #12
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
I'm glad I could help

first of all regarding the hosts thing as you mentioned

It is required only when you want to use a hostname instead of an IP address (name to IP resolution) i.e. for eg if you want to ssh 192.168.0.100 whose hostname is example.com

then simple in
Code:
/etc/hosts
create a entry

Code:
192.168.0.100    example.com
and next time you don't need to remember the ip
simple
Code:
ssh example.com
So I don't think it plays much vital role in DNS configurations

and for MX record

try this

Code:
#vi kadalur.com

               IN MX     10 mail.kadalur.com.

Last edited by deep27ak; 10-27-2011 at 11:03 PM.
 
1 members found this post helpful.
Old 10-28-2011, 09:39 AM   #13
loveulinux
Member
 
Registered: Aug 2011
Posts: 68

Original Poster
Rep: Reputation: Disabled
DNS resolves only on server

Hi..Deepak, Thanks for the reply, what is this number 10, Is this last octet of the IP address, if yes, then should we show this in also reverse lookup zone file. can we not use any other number, because I googled for mx record but couldn't understand much about number 10 and also found everywhere it is 10.

Code:
#vi kadalur.com

               IN MX     10 mail.kadalur.com.

Last edited by loveulinux; 10-28-2011 at 09:42 AM. Reason: correction
 
Old 10-28-2011, 11:12 AM   #14
deep27ak
Senior Member
 
Registered: Aug 2011
Location: Bangalore, India
Distribution: rhel 5x,6.0,6.2, centOS 5x,6.0,6.2
Posts: 1,194
Blog Entries: 4

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by loveulinux View Post
Hi..Deepak, Thanks for the reply, what is this number 10, Is this last octet of the IP address, if yes, then should we show this in also reverse lookup zone file. can we not use any other number, because I googled for mx record but couldn't understand much about number 10 and also found everywhere it is 10.

Code:
#vi kadalur.com

               IN MX     10 mail.kadalur.com.
MX record depends on the preference value that is mentioned as 10 and can be any value from 0 to 65535.
this plays its role when there are more than 1 mail server and the MX entry with the lowest preference value is preferred

and honestly speaking even I have not tried with any other preference value so you can give a try but a preference value is mandatory.
 
1 members found this post helpful.
Old 10-29-2011, 12:38 AM   #15
loveulinux
Member
 
Registered: Aug 2011
Posts: 68

Original Poster
Rep: Reputation: Disabled
DNS resolves only on server

Thanks Mr.Deepak. You helped me a lot with this tread. And please never mind because I wasted your valuable time with this.


Quote:
Originally Posted by deep27ak View Post
MX record depends on the preference value that is mentioned as 10 and can be any value from 0 to 65535.
this plays its role when there are more than 1 mail server and the MX entry with the lowest preference value is preferred

and honestly speaking even I have not tried with any other preference value so you can give a try but a preference value is mandatory.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DNS doesn't resolves when restart server shahz Red Hat 3 11-16-2007 09:18 AM
Ping resolves DNS but other apps don't? jago25_98 Linux - Networking 12 02-25-2007 03:39 PM
Fix: 'apt-get update' dns resolves to 1.0.0.0 benjeeqds Linux - Software 0 04-09-2006 07:46 AM
Virtual Hosts, DNS resolves, PLEASE HELP!! parasbshah Linux - Software 14 10-17-2005 01:38 PM
Any name resolves to. A? CNAME? DNS Q dlublink Linux - Networking 3 01-11-2005 09:55 AM


All times are GMT -5. The time now is 01:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration