<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Linux Forum &mdash; DHCP + DDNS]]></title>
	<link rel="self" href="https://linuxforum.ru/extern.php?action=feed&amp;tid=13263&amp;type=atom" />
	<updated>2011-05-11T11:28:49Z</updated>
	<generator>PunBB</generator>
	<id>https://linuxforum.ru/viewtopic.php?id=13263</id>
		<entry>
			<title type="html"><![CDATA[Re: DHCP + DDNS]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=177937#p177937" />
			<content type="html"><![CDATA[<p>Наконецто настроил связку --=XliN=-- помнил как я мучался с этим)) Вообщем в ходе следственных экспериментов выявил важную особенность, для того чтобы создавались файлы&nbsp; *.jnl так же вносились записи в зоны DNS<br />нужно создать каталог в него положить файлы зон и назначить владельца bind этого каталога, иначе bind не будет иметь полномочия для внесения изменений<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">chown -R bind:bind /var/named/dynamic/ </div> <br />просто назначить владельца bind на файлы зон не достаточно, по крайней мере в моем случае. Так что может кому пригодиться имейте в виду и такую особенность)</p>]]></content>
			<author>
				<name><![CDATA[sagvir]]></name>
				<uri>https://linuxforum.ru/profile.php?id=15826</uri>
			</author>
			<updated>2011-05-11T11:28:49Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=177937#p177937</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: DHCP + DDNS]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=174661#p174661" />
			<content type="html"><![CDATA[<p>Ещё бы man найти нормальный</p>]]></content>
			<author>
				<name><![CDATA[Kettler]]></name>
				<uri>https://linuxforum.ru/profile.php?id=11719</uri>
			</author>
			<updated>2011-05-01T09:46:03Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=174661#p174661</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: DHCP + DDNS]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=174657#p174657" />
			<content type="html"><![CDATA[<p>Я бы логи вот так снял бы.... Проще читать<br /></p><div class="codebox"><pre><code>logging {
        channel query_logging {
                file &quot;data/named_querylog&quot;
                        versions 20 size 200M;
                print-time yes;
                severity dynamic;
        };
        channel security {
                file &quot;data/named_security&quot;
                        versions 10 size 50M;
                print-time yes;
                severity dynamic;
        };
        channel resolver {
                file &quot;data/named_resolver&quot;
                        versions 2 size 50M;
                print-time yes;
                severity dynamic;
        };
        channel network {
                file &quot;data/named_network&quot;
                        versions 2 size 50M;
                print-time yes;
                severity dynamic;
        };
        channel xfer {
                file &quot;data/named_xfer&quot;
                        versions 2 size 50M;
                print-time yes;
                severity dynamic;
        };
        channel client {
                file &quot;data/named_client&quot;
                        versions 2 size 50M;
                print-time yes;
                severity dynamic;
        };
        category queries { query_logging; };
        category security { security; };
        category resolver { resolver; };
        category network { network; };
        category xfer-in { xfer; };
        category xfer-out { xfer; };
        category client { client; };

        channel syslog_errors {
                syslog user;
                severity error;
        };
        category default { syslog_errors;  };

        category lame-servers { null; };
        category security { null; };
};</code></pre></div>]]></content>
			<author>
				<name><![CDATA[XliN]]></name>
				<uri>https://linuxforum.ru/profile.php?id=6412</uri>
			</author>
			<updated>2011-05-01T09:41:44Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=174657#p174657</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[DHCP + DDNS]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=174583#p174583" />
			<content type="html"><![CDATA[<p>Выложу свои конфиги может кому пригодятся&nbsp; smile </p><p>===== Настройка DDNS+DHCP =====</p><p>apt-get install bind9 dhcp3-server</p><p>Давайте возьмём как пример example.com</p><p>cat /etc/bind/named.conf<br /></p><div class="codebox"><pre><code>    include &quot;/etc/bind/named.conf.options&quot;;
    include &quot;/etc/bind/named.conf.local&quot;;
    include &quot;/etc/bind/named.conf.default-zones&quot;;
    
    controls {
        inet 127.0.0.1 allow {localhost; } keys { &quot;rndc-key&quot;; };
    };
    
    include &quot;/etc/bind/rndc.key&quot;;</code></pre></div><p>cat /etc/bind/named.conf.options<br /></p><div class="codebox"><pre><code>    logging {
        channel update_debug {
            file &quot;/etc/bind/named-update.log&quot;;
            severity  debug 3;
            print-category yes;
            print-severity yes;
            print-time     yes;
        };
    
    channel security_info    {
            file &quot;/etc/bind/named-auth.log&quot;;
            severity  info;
            print-category yes;
            print-severity yes;
            print-time     yes;
    };
    
      category update { update_debug; };
      category security { security_info; };
    
    };
    
    acl &quot;corpnets&quot; { 172.16.0.0/24; 127.0.0.1; 192.168.0.0/24;};
    options {
        directory &quot;/var/cache/bind&quot;;
    
        // If there is a firewall between you and nameservers you want
        // to talk to, you may need to fix the firewall to allow multiple
        // ports to talk.  See http://www.kb.cert.org/vuls/id/800113
    
        // If your ISP provided one or more IP addresses for stable
        // nameservers, you probably want to use them as forwarders.
        // Uncomment the following block, and insert the addresses replacing
        // the all-0&#039;s placeholder.
    forwarders {
    208.67.222.222;
    208.67.220.220;
    };
    
    auth-nxdomain no;    # conform to RFC1035
    listen-on-v6 { any; };
    allow-query { &quot;corpnets&quot;; };
    };</code></pre></div><p>cat /etc/bind/named.conf.local<br /></p><div class="codebox"><pre><code>    zone &quot;example.com&quot; {
        type master;
        file &quot;/etc/bind/example.com.zone&quot;;
        allow-update { key &quot;rndc-key&quot;; };
        notify yes;
    };
    zone &quot;0.16.172.in-addr.arpa&quot; {
        type master;
        file &quot;/etc/bind/0.16.172.in-addr.arpa.zone&quot;;
        allow-update { key &quot;rndc-key&quot;; };
        notify yes;
    };</code></pre></div><p>cat /etc/bind/example.com.zone<br /></p><div class="codebox"><pre><code>    $ORIGIN .
    $TTL 86400      ; 1 day
    example.com             IN SOA  example.com. root.example.com. (
                                51         ; serial
                                28800      ; refresh (8 hours)
                                7200       ; retry (2 hours)
                                604800     ; expire (1 week)
                                86400      ; minimum (1 day)
                                )
                        NS      server.example.com.
    $ORIGIN example.com.
    server                  A       172.16.0.1</code></pre></div><p>cat /etc/bind/0.16.172.in-addr.arpa.zone<br /></p><div class="codebox"><pre><code>    $ORIGIN .
    $TTL 86400      ; 1 day
    0.16.172.in-addr.arpa   IN SOA  0.16.172.in-addr.arpa. root.0.16.172.in-addr.arpa. (
                                51         ; serial
                                28800      ; refresh (8 hours)
                                7200       ; retry (2 hours)
                                604800     ; expire (1 week)
                                86400      ; minimum (1 day)
                                )
                        NS      server.0.16.172.in-addr.arpa.
    $ORIGIN 0.16.172.in-addr.arpa.
    1                       PTR     server.example.com.
    $TTL 10800      ; 3 hours
    server                  A       172.16.0.1</code></pre></div><p>cat /etc/bind/rndc.key<br /></p><div class="codebox"><pre><code>    key &quot;rndc-key&quot; {
        algorithm hmac-md5;
        secret &quot;x64NWyCzBPF/hDTX8T3eEg==&quot;;
    };</code></pre></div><p>cat /etc/dhcp3/dhcpd.conf<br /></p><div class="codebox"><pre><code>    
    authoritative;
    default-lease-time 600;
    max-lease-time 7200;
    option wpad-curl code 252 = text;
    
    key &quot;rndc-key&quot; {
        algorithm hmac-md5;
        secret &quot;x64NWyCzBPF/hDTX8T3eEg==&quot;;
    };
    
    server-identifier    server;
    ddns-domainname         &quot;example.com.&quot;;
    ddns-rev-domainname     &quot;in-addr.arpa.&quot;;
    ddns-update-style       interim;
    ddns-updates            on;
    ignore                  client-updates;
    
    
    # This is the communication zone
    
    zone example.com. {
    primary 127.0.0.1;
    key &quot;rndc-key&quot;;
    }
    
    default-lease-time      21600;  # 6 hours
    max-lease-time          43200;  # 12 hours
    
    
    # Client configuration:
    
    option domain-name      &quot;example.com.&quot;;
    option ip-forwarding    off;
    
    subnet 172.16.0.0 netmask 255.255.255.0 {
       option routers                  172.16.0.1;  #getway
       option subnet-mask              255.255.255.0; #маска
       option domain-name-servers       172.16.0.1; #DNS-сервера
       option broadcast-address    172.16.0.255;
       option wpad-curl &quot;http://172.16.0.1:88/wpad.dat&quot;;
       range 172.16.0.10 172.16.0.90; # Диапазон ip адресов
       filename &quot;hiren/pxelinux.0&quot;;
       next-server 172.16.0.1;
       allow    unknown-clients;
    
    zone    0.16.172.in-addr.arpa. {
            primary 172.16.0.1;
            key             &quot;rndc-key&quot;;
    }
    
    zone    localdomain. {
            primary 172.16.0.1;
            key             &quot;rndc-key&quot;;
    }
    
    }</code></pre></div><p>В Ubuntu возникла пробела с правами apparmor</p><p>nano /etc/apparmor.d/usr.sbin.named</p><p>ищим</p><p>/etc/bind/** r, заменяем на /etc/bind/** rw,</p>]]></content>
			<author>
				<name><![CDATA[Kettler]]></name>
				<uri>https://linuxforum.ru/profile.php?id=11719</uri>
			</author>
			<updated>2011-05-01T07:09:04Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=174583#p174583</id>
		</entry>
</feed>
