Pages

Thursday, July 28, 2016

BIND configuration file (named) - forward zone

named.conf

options {
        // All file and path names are relative to the chroot directory,
        // if any, and should be fully qualified.
        directory       "/usr/local/etc/namedb/working";
        pid-file        "/var/run/named/pid";
        dump-file       "/var/dump/named_dump.db";
        statistics-file "/var/stats/named.stats";
        allow-query     { any; };
        allow-transfer  { any; };

// If named is being used only as a local resolver, this is a safe default.
// For named to be accessible to the network, comment this option, specify
// the proper IP address, or delete this option.
        listen-on       { 127.0.0.1; 192.168.4.4; };
...
        forwarders {
                8.8.8.8; 8.8.4.4;
        };

...

zone "home.uw.cz" {
        type master;
        file "/usr/local/etc/namedb/master/home.uw.cz.db";
};

zone "4.168.192.in-addr.arpa" {
        type master;
        file "/usr/local/etc/namedb/master/4.168.192.in-addr.arpa.db";
};


ZONE CONF

SOA entry


Serial number
Serial number of the database file. It is maintained automatically and cannot be changed.
Administrator
E-mail address of the person responsible for data. Cannot be changed.
TTL
This value refers to all DNS entries of the given domain. It determines how long the other (non-authoritative) name files can keep the given entry in their cache memory. The lower the value the sooner the changes in the entries fully show on the whole Internet. It is recommended to be set to 1 day.
recovery (refresh)
Determinates how often the secondary name servers check its data.
Repetition (retry)
If the secondary name server cannot contact the primary server after the expiration of the Recovery interval, the next attempts follow in an interval determined by the value of Repetition in seconds.
Validity expiration (expire)
If the secondary name server cannot contact the primary servers until the Validity expiration, it will stop providing any information. The validity expiration must have a higher value than Recovery.
DNS entries


Name
Domain name within your domain. If the domain name is given without full stop at the end, the current domain will be automatically added. If the domain name is entered with a full stop at the end, it is held for an absolute name. You can enter as domain name the commercial sign @, which refers to the current domain, or the asterisk *, which refers to all domain names not explicitly defined.
Type
Entry type A, MX, CNAME or NS.
Database
Data depending on the type of entry. If you use full domain name, do not forget to put a full stop behind it, otherwise the name will be completed with the current domain.
MX
Mail server priority. Makes sense only with MX type entries. The e-mails are delivered to the server with the lowest priority first.

Bind DNS Server Web interface,Frontend or GUI Tools
http://www.debianadmin.com/bind-dns-server-web-interfacefrontend-or-gui-tools.html

Examples:

$TTL    3h
vsphere.local. SOA ns1.vshere.local. vsphere.local. 45 1d 12h 1w 3h
        ; Serial, Refresh, Retry, Expire, Neg. cache TTL

        NS      ns1.vsphere.local.

ns1     A       192.168.14.1
dns     CNAME   ns1
gw      CNAME   ns1
vc      A       192.168.14.100
nsxm    A       192.168.14.99

-----------------------------------------------------------------------

$TTL 10800
example.com.    IN      SOA      ns1.example.uw.cz. dpasek.example.com. (
                                2016072806      ; Serial
                                10800           ; Refresh
                                3600            ; Retry
                                604800          ; Expire
                                300             ; Negative Response TTL
                        )

; DNS Servers
                IN      NS      ns1.example.com.
                IN      NS      ns2.example.com.

; MX Records
;                IN      MX 10   mx.example.com.
;                IN      MX 20   mail.example.com.

; Machine Names
ns1             IN      A       192.168.4.4
ns2             IN      A       192.168.4.20
;
server1       IN      A       192.168.4.60
server2       IN      A       192.168.4.61

; Aliases
web1          IN      CNAME   server1.example.com.
web2          IN      CNAME   server2.example.com.
 
-----------------------------------------------------------------------
 
$TTL 86400
@       IN      SOA     ns1.p6.uw.cz. admin.p6.uw.cz. (
                        2024030902  ; Serial
                        3600        ; Refresh
                        1800        ; Retry
                        1209600     ; Expire
                        86400 )     ; Minimum TTL

        IN      NS      ns1.p6.uw.cz.

gw1     IN      A       10.160.4.254
ns1     IN      A       10.160.4.254
mwin01  IN      A       10.160.4.24
mlin01  IN      A       10.160.4.26
nsxm    IN      A       10.160.4.99
vc01    IN      A       10.160.4.100
esx11   IN      A       10.160.4.111
esx12   IN      A       10.160.4.112
esx13   IN      A       10.160.4.113
esx14   IN      A       10.160.4.114

Test DNS

to resolve forward record
dig +noall +answer www.gnu.org

to resolve reverse lookup
dig +noall +answer -x 199.232.41.10


BIND configuration file - reverse zone

$TTL 10800
4.168.192.in-addr.arpa. IN      SOA     ns1.home.uw.cz. dpasek.home.uw.cz. (
                                2016072808      ; Serial
                                10800           ; Refresh
                                3600            ; Retry
                                604800          ; Expire
                                300             ; Negative Response TTL
                        )

4.168.192.in-addr.arpa. IN      NS      ns1.home.uw.cz.
4.168.192.in-addr.arpa. IN      NS      ns2.home.uw.cz.

100                     IN      PTR     vc01.home.uw.cz.
101                     IN      PTR     esx01.home.uw.cz.
102                     IN      PTR     esx02.home.uw.cz.

AppleTV AirPlay and Avahi

FreeBSD with two interfacex (vmx0,vmx1)

/usr/local/etc/avahi/avahi-daemon.conf

[server]
allow-interfaces=vmx0,vmx1

[publish]
publish-workstation=yes

[reflector]
enable-reflector=yes


Tuesday, July 26, 2016

Kodi TV

Add Ons 

  http://srp.nu/
  http://kodi-czsk.github.io/repository/



sosac
  http://movies.sosac.tv/cs/