{"id":125,"date":"2021-09-19T18:38:40","date_gmt":"2021-09-19T16:38:40","guid":{"rendered":"https:\/\/tomnem.cz\/wordpress\/?p=125"},"modified":"2024-04-07T16:47:05","modified_gmt":"2024-04-07T14:47:05","slug":"bind-v-ubuntu-network-manager","status":"publish","type":"post","link":"https:\/\/tomnem.cz\/wordpress\/index.php\/2021\/09\/19\/bind-v-ubuntu-network-manager\/","title":{"rendered":"Bind v ubuntu  &#8211; network manager"},"content":{"rendered":"\n<p>Pod\u00edv\u00e1me se na nstaven\u00ed Bind9 v Ubuntu pro dom\u00e1c\u00ed s\u00ed\u0165. Po u\u017e\u00edv\u00e1m p\u0159edev\u0161\u00edm pro obsluhu Virtu\u00e1ln\u00edch po\u010d\u00edta\u010d\u016f, proto \u0159e\u0161\u00edm pou\u017eit\u00ed s network managerem. Ka\u017edop\u00e1dn\u011b z\u00e1kladem je konfigurace po\u010d\u00edta\u010de s pevnou ip adresou. Pokud provozuje server, je mo\u017en\u00e9 pou\u017e\u00edt n\u00e1stroj nmtui bez grafick\u00e9ho rozhran\u00ed.<\/p>\n\n\n<p>Bodem jedna je instalace bind9.<\/p>\n\n\n<pre class=\"wp-block-code\"><code>udo apt-get install bind9 bind9utils bind9-doc<\/code><\/pre>\n\n\n<p>Pro sv\u00e9 \u00fa\u010dely nepot\u0159ebuji aby bind naslouchal iv rozsahu IPV6. Zru\u0161\u00edm tedy naslouch\u00e1n\u00ed v souboru  \/etc\/default\/bind9.<\/p>\n\n\n<pre class=\"wp-block-code\"><code>OPTIONS=\"-u bind -4\"<\/code><\/pre>\n\n\n<p>Ted se pust\u00edme do z\u00e1kladn\u00ed konfigurace Bindu, Za\u010dnme,e souborem \/etc\/bind\/named.conf.options<\/p>\n\n\n<pre class=\"wp-block-code\"><code>options {\n    directory \"\/var\/cache\/bind\";\n    listen-on { 192.168.0.45; 127.0.0.1; };\n    dnssec-enable yes;\n    dnssec-validation yes;\n    listen-on-v6 { none; };\n    edns-udp-size 1232;\n    max-udp-size 1232;\n    forward  first;\n        forwarders {\n                192.168.0.1;\n                8.8.8.8;\n                };\n\t};<\/code><\/pre>\n\n\n<p>Zde je nutno p\u0159edev\u0161\u00edm nastavit na kter\u00e9m rozsahu bude bind poslouchat a adresy server\u016f, kam nespln\u011bn\u00e9 po\u017eadavky p\u0159eposlat. D\u00e1le budeme nastavovat na\u0161e lok\u00e1ln\u00ed z\u00f3ny:<\/p>\n\n\n<pre class=\"wp-block-code\"><code>zone \"domov.local\" {\n    type master;\n    file \"\/etc\/bind\/zones\/db.domov.local\"; # cesta k souboru\nzone \"0.168.192.in-addr.arpa\" {\n    type master;\n    file \"\/etc\/bind\/zones\/db.192.168.0\";  # 192.168.0.0\/24 subnet\n    };\n<\/code><\/pre>\n\n\n<p>Dal\u0161\u00edm krokem bude se pod\u00edvat p\u0159\u00edmo na z\u00f3nov\u00e9 soubory. Nejd\u0159\u00edve forward zonu \/etc\/bind\/zones\/db.domov.local.<\/p>\n\n\n<pre class=\"wp-block-code\"><code>;\n;  Database file domov.local.dns for Default zone scope in zone domov.local.\n;      Zone version:  2\n;\n@                       IN  SOA bind.domov.local. hostmaster.domov.local. (\n                        \t\t2            ; serial number\n                        \t\t900          ; refresh\n                        \t\t600          ; retry\n                        \t\t86400        ; expire\n                        \t\t3600       ) ; default TTL\n;\n;  Zone NS records\n;\n@                       NS\tbind.domov.local.\n;\n;  Zone records\n;\nbind                    A\t192.168.0.45\nweb                     A       192.168.0.170\ndomena20                A\t192.168.0.190\n<\/code><\/pre>\n\n\n<p>Potom reverze z\u00f3nu \/etc\/bind\/zones\/db.192.168.0.<\/p>\n\n\n<pre class=\"wp-block-code\"><code>;\n;  Database file 0.168.192.in-addr.arpa.dns for Default zone scope in zone 0.168.192.in-addr.arpa.\n;      Zone version:  2\n;\n@                       IN  SOA bind.domov.local. hostmaster.domov.local. (\n                        \t\t2            ; serial number\n                        \t\t900          ; refresh\n                        \t\t600          ; retry\n                        \t\t86400        ; expire\n                        \t\t3600       ) ; default TTL\n;\n;  Zone NS records\n;\n@                       NS\tbind.domov.local.\n;\n;  Zone records\n;\n20                      PTR web.domov.local.\n20                      PTR domena20.domov.local.<\/code><\/pre>\n\n\n<p> Potom je nutn\u00e9 vy\u0159e\u0161it jeden probl\u00e9m u Ubuntu je soubor \/etc\/resolf.conf \u0161patn\u011b nasm\u011brov\u00e1n a bind s t\u00edmhle neum\u00ed pracovat.<\/p>\n\n\n<pre class=\"wp-block-code\"><code>unlink \/etc\/resolv.conf\nln -s \/run\/systemd\/resolve\/resolv.conf \/etc\/resolv.conf<\/code><\/pre>\n\n\n<p>D\u00e1le m\u016f\u017eeme vyzkou\u0161et funk\u010dnost. <\/p>\n\n\n<pre class=\"wp-block-code\"><code>dig A www.seznam.cz@192.168.0.45<\/code><\/pre>\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pod\u00edv\u00e1me se na nstaven\u00ed Bind9 v Ubuntu pro dom\u00e1c\u00ed s\u00ed\u0165. Po u\u017e\u00edv\u00e1m p\u0159edev\u0161\u00edm pro obsluhu Virtu\u00e1ln\u00edch po\u010d\u00edta\u010d\u016f, proto \u0159e\u0161\u00edm pou\u017eit\u00ed s network managerem. Ka\u017edop\u00e1dn\u011b z\u00e1kladem je konfigurace po\u010d\u00edta\u010de s pevnou ip adresou. Pokud provozuje server, je mo\u017en\u00e9 pou\u017e\u00edt n\u00e1stroj nmtui bez grafick\u00e9ho rozhran\u00ed. Bodem jedna je instalace bind9. Pro sv\u00e9 \u00fa\u010dely nepot\u0159ebuji aby bind naslouchal &hellip;<br \/><a href=\"https:\/\/tomnem.cz\/wordpress\/index.php\/2021\/09\/19\/bind-v-ubuntu-network-manager\/\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\">Pokra\u010dovat ve\u00a0\u010dten\u00ed <span class=\"screen-reader-text\">Bind v ubuntu  &#8211; network manager<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/tomnem.cz\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/125"}],"collection":[{"href":"https:\/\/tomnem.cz\/wordpress\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tomnem.cz\/wordpress\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tomnem.cz\/wordpress\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tomnem.cz\/wordpress\/index.php\/wp-json\/wp\/v2\/comments?post=125"}],"version-history":[{"count":1,"href":"https:\/\/tomnem.cz\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/125\/revisions"}],"predecessor-version":[{"id":185,"href":"https:\/\/tomnem.cz\/wordpress\/index.php\/wp-json\/wp\/v2\/posts\/125\/revisions\/185"}],"wp:attachment":[{"href":"https:\/\/tomnem.cz\/wordpress\/index.php\/wp-json\/wp\/v2\/media?parent=125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tomnem.cz\/wordpress\/index.php\/wp-json\/wp\/v2\/categories?post=125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tomnem.cz\/wordpress\/index.php\/wp-json\/wp\/v2\/tags?post=125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}