linux - how do i set up local bind server for dev machine to map to vhosts on server -


im trying set bind dns controller https://wiki.archlinux.org/index.php/bind on arch linux box. main thing need out of no longer need edit windows/system32/drivers/etc/hosts file again on win7 dev box, , can delete every custom entry in gone, , let bind map vhost entries me.

here current /etc/named.conf http://dpaste.com/1xz8jjr here /var/named/falcon.local.zone http://dpaste.com/094jgpr

i changing domain name ld.pvt, when see references falcon.local being upgraded

a bit more machine, hostname: falcon, multiple roles; master backup san zfs array, apache lamp stack personal internal professional dev, dns (new), ssh, etc..

what want dns server machine (falcon) make available vhost resources share same subdomain (ld.pvt).
resources might this:

bleedingedgewebsites.com.ld.pvt (domain mimick, development) falcon.ld.pvt (root address, 1 list directory, can click forgotton resources or resources missing vhost entries) phpmyadmin.ld.pvt tickets.ld.pvt jenkins.ld.pvt 

in zone file, prefer use wildcard internal resources, don't have (e.g. *.ld.pvt)), wont need list each of these individually, , each time come new. , rather add entry vhost file only, , type in address bar of dev machine, , viola!

can these records, , or cnames?

(after recent research, understand maybe wildcard goes in vhost, , 1 entry needed here...)

should zone soa ns1.ld.pvt, or <hostname>.ld.pvt, or former, records both?

there example here on teh arch site. im caught between 1 https://wiki.archlinux.org/index.php/bind#1._creating_a_zonefile has disclaimer starting point, , others more need, arent specific arch, these https://www.digitalocean.com/community/tutorials/how-to-configure-bind-as-a-private-network-dns-server-on-ubuntu-14-04 https://help.github.com/articles/tips-for-configuring-an-a-record-with-your-dns-provider/ same?

i need example both /var/named/ld.pvt.zone /etc/named.conf master entry

i need 1 working solution started.

to bind working correctly, there rules follow configured correctly.

you need choose domain, add zone record it, adding 1 entry hostname inside zone record, @ top, otherwise mentions domain only.

it's habit end domain names in dot, in config file, e.g. domain.com.

the ns name, can domain name.

the record can ip of machine, not localhost, since other machines in network pull ip specified.

once have record, can go hog wild adding domain names, or can wildcard it, did. domains ending in domain chose map web development stuff.

the dns settings in ip properties of adapter on machine want use dns services, i.e. client, want set dns lan ip of dns server.

only adjustments needed /etc/named.conf, /var/named/ld.pvt.zone, , ip properties mentioned above.

here config files, enjoy!

/etc/named.conf

// vim:set ts=4 sw=4 et:  acl "trusted" {         192.168.1.0/24;         127.0.0.0/8; };  options {     directory "/var/named";     pid-file "/run/named/named.pid";     listen-on { trusted; };     listen-on-v6 { any; };     allow-query { trusted; };     allow-transfer { none; };     allow-update { none; };     forwarders {         8.8.4.4;         8.8.8.8;     };     query-source address * port 53;     version none;     hostname none;     server-id none; };  logging {     channel default_file {         file "/var/log/named/default.log" versions 3 size 5m;         severity dynamic;         print-time yes;     };     channel general_file {         file "/var/log/named/general.log" versions 3 size 5m;         severity dynamic;         print-time yes;     };     channel database_file {         file "/var/log/named/database.log" versions 3 size 5m;         severity dynamic;         print-time yes;     };     channel security_file {         file "/var/log/named/security.log" versions 3 size 5m;         severity dynamic;         print-time yes;     }; channel config_file {         file "/var/log/named/config.log" versions 3 size 5m;         severity dynamic;         print-time yes;     };     channel resolver_file {         file "/var/log/named/resolver.log" versions 3 size 5m;         severity dynamic;         print-time yes;     };     channel xfer-in_file {         file "/var/log/named/xfer-in.log" versions 3 size 5m;         severity dynamic;         print-time yes;     };     channel xfer-out_file {         file "/var/log/named/xfer-out.log" versions 3 size 5m;         severity dynamic;         print-time yes;     };     channel notify_file {         file "/var/log/named/notify.log" versions 3 size 5m;         severity dynamic;         print-time yes;     };     channel client_file {         file "/var/log/named/client.log" versions 3 size 5m;         severity dynamic;         print-time yes;     };     channel unmatched_file {         file "/var/log/named/unmatched.log" versions 3 size 5m;         severity dynamic;         print-time yes;     };     channel queries_file {         file "/var/log/named/queries.log" versions 3 size 5m;         severity dynamic;         print-time yes;     };     channel network_file {         file "/var/log/named/network.log" versions 3 size 5m;         severity dynamic;         print-time yes;     };     channel update_file {         file "/var/log/named/update.log" versions 3 size 5m;         severity dynamic;         print-time yes;     };     channel dispatch_file {         file "/var/log/named/dispatch.log" versions 3 size 5m;         severity dynamic;         print-time yes;     };     channel dnssec_file {         file "/var/log/named/dnssec.log" versions 3 size 5m;         severity dynamic;         print-time yes;     }; channel lame-servers_file {         file "/var/log/named/lame-servers.log" versions 3 size 5m;         severity dynamic;         print-time yes;     };     category default { default_file; };     category general { general_file; };     category database { database_file; };     category security { security_file; };     category config { config_file; };     category resolver { resolver_file; };     category xfer-in { xfer-in_file; };     category xfer-out { xfer-out_file; };     category notify { notify_file; };     category client { client_file; };     category unmatched { unmatched_file; };     category queries { queries_file; };     category network { network_file; };     category update { update_file; };     category dispatch { dispatch_file; };     category dnssec { dnssec_file; };     category lame-servers { lame-servers_file; }; };  zone "ld.pvt" in {     type master;     file "ld.pvt.zone"; }; 

/var/named/ld.pvt.zone

$ttl 7200 @               1d in soa       ld.pvt. root.ld.pvt. (                                         2007011622      ; serial                                         3h              ; refresh                                         15m             ; retry                                         1w              ; expire - 1 week                                         1d )            ; minimum                  in      ns      ld.pvt. ld.pvt.         in            192.168.1.10 *.ld.pvt.       in      cname   ld.pvt. 

you might need

# mkdir /var/db/nscd # touch /etc/netgroup # systemctl restart named 

use journalctl -xn errors.

once running, should able ping anything.ld.pvt, vhost know do!

now on client machine, need adjust dns, , flush dns resolver cache. nscd -k nscd or winbox, ipconfig /flushdns, try pinging on lan new anything.ld.pvt.

to put client box on map, need add record, pointing ip, e.g. automated-pooper-scooper.ld.pvt. in 192.168.1.44


Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -