Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
hii eveybody
i need to configure DNS ,it should be configured to use 192.168.0.0/24 and not the localhost (127.0.0.1)..
I have
1.Install BIND
2.Configure BIND
Quote:
[root@localhost ~]# vi /etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
view "internal" {
match-clients {
localhost;
192.168.0.0/24;
};
zone "." IN {
type hint;
file "named.ca";
};
zone "pure.world" IN {
type master;
file "pure.world.lan";
allow-update { none; };
};
zone "0.168.192.in-addr.arpa" IN {
type master;
file "0.168.192.db";
allow-update { none; };
};
include "/etc/named.rfc1912.zones";
};
view "external" {
match-clients { any; };
allow-query { any; };
recursion no;
zone "pure.world" IN {
type master;
file "pure.world.wan";
allow-update { none; };
};
zone "80.0.168.192.in-addr.arpa" IN {
type master;
file "80.0.168.192.db";
allow-update { none; };
};
};
3.Create zone files that servers resolve IP address from domain name
4.Start BIND
Quote:
[root@localhost ~]# /etc/rc.d/init.d/named start
Starting named:[ OK ]
[root@dlp ~]# chkconfig named on
5.
Quote:
[root@loctalhos ~]# vi /etc/resolv.conf
I get this message!!
Quote:
# Generated by NetworkManager
# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com
1. You must configure DHCP to set the DNS servers as your Linux Server IP
2. You can Linux Server IP (DNS server IP) in Network configuration of Windows and test the DNS
$TTL 86400
@ IN SOA asd.pure.world. root.pure.world.(
2011071002 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
IN NS asd.pure.world.
IN A 192.168.0.30
IN MX 10 asd.pure.world.
asd IN A 192.168.0.30
ftp IN CNAME ftp.pure.world
~
~
~
~
~
~
~
"/var/named/pure.world.lan" 16L, 503C
and the cat /etc/resolv.conf
Quote:
[root@localhost ~]# cat /etc/resolv.conf
# Generated by NetworkManager
# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com
[root@localhost ~]#
$TTL 86400
@ IN SOA asd.pure.world. root.pure.world.(
2011071002 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
IN NS asd.pure.world.
IN A 192.168.13.2
IN MX 10 asd.pure.world.
asd IN A 192.168.13.2
ftp IN CNAME ftp.pure.world
check your resolv.conf
take a backup of current resolv.conf
Code:
#cp /etc/resolv.conf /resolv.conf.orig
Code:
#vi /etc/resolv.conf
(remove everyline and add this)
nameserver 192.168.13.2
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
options {
listen-on port 53 {127.0.0.1; 192.168.0.0/24; };
listen-on-v6 port 53 { none; };
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
allow-query { localhost; 192.168.0.0/24;};
allw-transfer {localhost; 192.168.0.0/24;};
recursion yes;
vi /etc/named/pure.world.lan
Quote:
$TTL 86400
@ IN SOA asd.pure.world. root.pure.world.(
2011071002 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
IN NS asd.pure.world.
IN A 192.168.0.30
IN MX 10 asd.pure.world.
asd IN A 192.168.0.30
ftp IN CNAME ftp.pure.world
~
~
~
~
~
~
~
"/var/named/pure.world.lan" 16L, 503C
vi /etc/named/pure.world.wan
Quote:
$TTL 86400
@ IN SOA asd.pure.world. root.pure.world.(
2011071001 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
IN NS asd.pure.world.
IN A 172.16.0.82
IN MX 10 asd.pure.world.
asd IN A 172.16.0.82
~
~
~
~
~
~
~
~
"/var/named/pure.world.wan" 16L, 506C
vi /etc/named/0.168.192.db
Quote:
$TTL 86400
@ IN SOA asd.pure.world. root.pure.world. (
2011071001 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
IN NS asd.pure.world.
IN PTR pure.world.
IN A 255.255.255.0
30 IN PTR asd.pure.world.
~
~
~
~
"/var/named/0.168.192.db" 20L, 410C
vi /etc/named/80.0.168.192.db
Quote:
$TTL 86400
@ IN SOA asd.pure.world. root.pure.world. (
2011071001 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
IN NS asd.pure.world.
IN PTR pure.world.
IN A 255.255.255.90
80 IN PTR asd.pure.world.
~
~
~
~
~
~
~
"/var/named/80.0.168.192.db" 17L, 408C
/etc/rc.d/init.d/named start
Quote:
[root@asd ~]# /etc/rc.d/init.d/named start
Starting named: [ OK ]
[root@asd ~]# chkconfig named on
[root@asd ~]#
vi /etc/resolv.conf
Quote:
E325: ATTENTION
Found a swap file by the name "/etc/.resolv.conf.swp"
owned by: root dated: Wed Dec 28 08:48:21 2011
file name: /etc/resolv.conf
modified: YES
user name: root host name: asd.pure.world
process ID: 2574
While opening file "/etc/resolv.conf"
dated: Wed Dec 28 08:18:35 2011
(1) Another program may be editing the same file.
If this is the case, be careful not to end up with two
different instances of the same file when making changes.
Quit, or continue with caution.
(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r /etc/resolv.conf"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file "/etc/.resolv.conf.swp"
to avoid this message.
"/etc/resolv.conf" 10L, 246C
Press ENTER or type command to continue
when I press enter
Quote:
# Generated by NetworkManager
search pure.world
# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com
~
~
~
~
~
~
~
~
~
~
~
~
~
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.