User login

Poll

Doriti un alt design pentru forum ?
Da
50%
Nu
50%
Total votes: 6

[banner]

[banner]

[banner]

named

Salut,

Am si eu o intrebare. Am configurat server DNS folosind bind, insa cand il pornesc sau vreau sa ii vad statusul imi arata asa:

root@Alin:~$ /etc/rc.d/named start
Starting named.
root@Alin:~$ /etc/rc.d/named status
named is not running.
root@Alin:~$

Ideea e ca merge. Mi-am pus ca DNS pe calculator, ip-ul serverului si merge, dar nu pricep de ce imi arata asa.

Uite aici un fisier pe care

Uite aici un fisier pe care l-am folosit timp de 3 ani pentru home firewall (dns caching).

// $OpenBSD: named-simple.conf,v 1.5 2003/09/22 20:44:32 jakob Exp $
//
// Example file for a simple named configuration, processing both
// recursive and authoritative queries using one cache.


// Update this list to include only the networks for which you want
// to execute recursive queries. The default setting allows all hosts
// on any IPv4 networks for which the system has an interface, and
// the IPv6 localhost address.
//
acl clients {
	192.168.10.0/24;
	::1;
};

options {
	forward only;
	forwarders { 193.231.249.1; };
	version "";	// remove this to allow version queries

	listen-on    { any; };
	listen-on-v6 { any; };

	allow-recursion { clients; };
};

logging {
	category lame-servers { null; };
};

// Standard zones
//
zone "." {
	type hint;
	file "standard/root.hint";
};

zone "localhost" {
	type master;
	file "standard/localhost";
	allow-transfer { localhost; };
};

zone "127.in-addr.arpa" {
	type master;
	file "standard/loopback";
	allow-transfer { localhost; };
};

zone "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" {
	type master;
	file "standard/loopback6.arpa";
	allow-transfer { localhost; };
};

zone "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.int" {
	type master;
	file "standard/loopback6.int";
	allow-transfer { localhost; };
};

zone "com" {
	type delegation-only;
};

zone "net" {
	type delegation-only;
};

// Master zones
//
//zone "myzone.net" {
//	type master;
//	file "master/myzone.net";
//};

// Slave zones
//
//zone "otherzone.net" {
//	type slave;
//	file "slave/otherzone.net";
//	masters { 192.0.2.1; [...;] };
//}; 

192.168.10.0/24; -> reteaua locala, fiecare PC din spatele serverului avea un IP: 192.168.10.1, 192.168.10.2, etc...

193.231.249.1; -> serverul DNS de la RDS. Trebuie schimbat.

Sper sa te ajute!

Mersi mult pentru ajutor,

Mersi mult pentru ajutor, insa tot asa imi face :(.
Hai ca iti arat ce imi da cand dau cu named -g.

root@Alin:/etc/namedb$ named -g
15-Jul-2008 17:16:08.592 starting BIND 9.3.1 -g
15-Jul-2008 17:16:08.593 found 1 CPU, using 1 worker thread
15-Jul-2008 17:16:08.653 loading configuration from '/etc/namedb/named.conf'
15-Jul-2008 17:16:08.668 listening on IPv6 interfaces, port 53
15-Jul-2008 17:16:08.676 listening on IPv4 interface xl0, 82.208.131.203#53
15-Jul-2008 17:16:08.679 could not listen on UDP socket: address in use
15-Jul-2008 17:16:08.680 creating IPv4 interface xl0 failed; interface ignored
15-Jul-2008 17:16:08.682 listening on IPv4 interface lo0, 127.0.0.1#53
15-Jul-2008 17:16:08.684 could not listen on UDP socket: address in use
15-Jul-2008 17:16:08.684 creating IPv4 interface lo0 failed; interface ignored
15-Jul-2008 17:16:08.813 command channel listening on 127.0.0.1#953
15-Jul-2008 17:16:08.819 command channel listening on ::1#953
15-Jul-2008 17:16:08.821 ignoring config file logging statement due to -g option
15-Jul-2008 17:16:08.827 additionally listening on IPv4 interface xl0, 82.208.131.203#53
15-Jul-2008 17:16:08.830 could not listen on UDP socket: address in use
15-Jul-2008 17:16:08.831 creating IPv4 interface xl0 failed; interface ignored
15-Jul-2008 17:16:08.832 additionally listening on IPv4 interface lo0, 127.0.0.1#53
15-Jul-2008 17:16:08.834 could not listen on UDP socket: address in use
15-Jul-2008 17:16:08.836 creating IPv4 interface lo0 failed; interface ignored
15-Jul-2008 17:16:08.849 zone 127.in-addr.arpa/IN: loaded serial 20080714
15-Jul-2008 17:16:08.863 zone 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: loaded serial 20080714
15-Jul-2008 17:16:08.875 zone 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.int/IN: loaded serial 20080714
15-Jul-2008 17:16:08.888 zone localhost/IN: loaded serial 42
15-Jul-2008 17:16:08.895 dns_rdata_fromtext: master/standautos.ro.hosts:3: near eol: unexpected end of input
15-Jul-2008 17:16:08.900 zone standautos.ro/IN: loading master file master/standautos.ro.hosts: unexpected end of input
15-Jul-2008 17:16:08.911 running

Este vorba de domeniul standautos.ro.

Si aici este fisierul named.conf:

root@Alin:/etc/namedb$ cat named.conf
// $OpenBSD: named-simple.conf,v 1.5 2003/09/22 20:44:32 jakob Exp $
//
// Example file for a simple named configuration, processing both
// recursive and authoritative queries using one cache.


// Update this list to include only the networks for which you want
// to execute recursive queries. The default setting allows all hosts
// on any IPv4 networks for which the system has an interface, and
// the IPv6 localhost address.
//
acl clients {
        192.168.10.0/24;
        ::1;
};

options {
        forward only;
        forwarders { 193.230.240.16; };
        version "";     // remove this to allow version queries

        listen-on    { any; };
        listen-on-v6 { any; };

        allow-recursion { clients; };
};

logging {
        category lame-servers { null; };
};

// Standard zones
//
zone "." {
        type hint;
        file "master/named.root";
};

zone "localhost" {
        type master;
        file "master/named.localhost";
        allow-transfer { localhost; };
};

zone "127.in-addr.arpa" {
        type master;
        file "master/localhost.rev";
        allow-transfer { localhost; };
};

zone
"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"
{
        type master;
        file "master/localhost-v6.rev";
        allow-transfer { localhost; };
};

zone
"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.int"
{
        type master;
        file "master/localhost-v6.rev";
        allow-transfer { localhost; };
};

zone "com" {
        type delegation-only;
};

zone "net" {
        type delegation-only;
};

// Master zones
//
zone "standautos.ro" {
        type master;
        file "master/standautos.ro.hosts";
};

// Slave zones
//
//zone "otherzone.net" {
//      type slave;
//      file "slave/otherzone.net";
//      masters { 192.0.2.1; [...;] };
//};
root@Alin:/etc/namedb$

Si fisierul standautos.ro.hosts:

root@Alin:/etc/namedb$ cat master/standautos.ro.hosts
$ttl 38400

standautos.ro.          IN      SOA     nsr1.standautos.ro.
admin.standautos.ro. (
                        5
                        10800
                        3600
                        604800
                        86400 )

@                IN      NS      nsr1.standautos.ro.
@                IN      MX      10 mail.standautos.ro.
nsr1             IN      A       82.208.131.203
www              IN      CNAME   @
mail             IN      A       82.208.131.203

root@Alin:/etc/namedb$

M-am folosit si de documentatia:

http://docs.freebsd.org/doc/5.4-RELEASE/usr/share/doc/handbook/network-dns.html

http://docs.freebsd.org/doc/5.4-RELEASE/usr/share/doc/handbook/network-bind9.html

Poate asa iti faci o idee ca eu ma tot chinui cu el si NU pricep ce are de nu merge :(.

Mersi

Pana la urma am reusit sa

Pana la urma am reusit sa rezolv cu "Unexpected end of input" dar tot nu merge named. Si domeniul nu este functional.

root@Alin:/etc/namedb$ /etc/rc.d/named start
Starting named.
^[[Aroot@Alin:/etc/namedb$ /etc/rc.d/named status
named is not running.
root@Alin:/etc/namedb$ ping standautos.ro
ping: cannot resolve standautos.ro: Host name lookup failure
root@Alin:/etc/namedb$

poate o sa ma prind si de asta intre timp, dar deja am "ros" destul documentatia si nu inteleg de ce imi face asa :-s

Problema named

Sunt curios daca pornesti named ca root sau ca un utilizator diferit. Din exemple observ ca pornesti named ca un utilizator neprivilegiat ($).
Problema "unexpected end of input" apare atunci cand uiti sa lasi rand nou la sfarsitul fisierelor de configurare.

In named.conf eu folosesc urmatoarele optiuni:

options {
directory "/etc/namedb";
pid-file "/var/run/named/pid";
dump-file "/var/dump/named_dump.db";
statistics-file "/var/stats/named.stats";
query-source address * port *;
allow-query {any;};
};

Din cate vad, named este

Din cate vad, named este functional si porneste la boot, insa uite ce nu inteleg:

root@Alin:~$ ps -A | grep named
258 ?? Is 0:00.10 /usr/sbin/syslogd -l /var/run/log -l /var/named/var/r
520 p0 R+ 0:00.02 grep named
root@Alin:~$ /etc/rc.d/named stop
named not running? (check /var/run/named/pid).
root@Alin:~$

Mi-l arata ca ruleaza, dar daca incerc sa il opresc, nu pot.

De ce ?

Din comanda ps eu nu vad cum

Din comanda ps eu nu vad cum ca ar rula named, eu vad doar ca ruleaza syslogd. Esti ferm convins ca named ruleaza? Verifica mai bine daca exista fiserul pid in /var/named/var/run/named.

Incearca varianta de named.conf ultrasimplista care o trimi mai jos si vezi daca porneste named (rulat ca root)
--------------
named.conf
--------------
options {
directory "/etc/namedb";
pid-file "/var/run/named/pid";
dump-file "/var/dump/named_dump.db";
statistics-file "/var/stats/named.stats";
query-source address * port *;
allow-query {any;};
recursion yes;
recursive-clients 30000;
zone-statistics yes;
};

zone "." {
type hint;
file "master/named.root";
};

zone "localhost" {
type master;
file "master/named.localhost";
allow-transfer { localhost; };
};

zone "127.in-addr.arpa" {
type master;
file "master/localhost.rev";
allow-transfer { localhost; };
};

zone "standautos.ro" {
type master;
file "master/standautos.ro.hosts";
allow-update {none;};
};

Nu a mers man nici asa :(.

Nu a mers man nici asa :(. Deja nu stiu ce sa ii mai fac ca sa mearga. Cand dau named -g, pare sa fie totul bine, dar daca il pornesc cu /etc/rc.d/named start mi zice "starting named", dar daca ii dau /etc/rc.d/named status imi zice "not running". Deja nu pricep ce nu ii bine. Oare nu am eu ceva pachet instalat? Sau trebuia ceva modul inclus in Kernel ? Ce nu e in regula? Lamuriti-ma ca nu mai pricep ...

Mersi