<commit_before># CREATE DNS SERVER USING BIND

_How to create a dns server using bind on linux._

tl;dr,

```bash
# ON DNS SERVER
tail -f /var/log/dns.jeffs-query.log
# ON EACH MACHINE / CLIENT
cat /etc/resolv.conf
# The ultimate goal is to have,
#     search jeffnet.lan
#     nameserver 192.168.20.110
#     nameserver 8.8.8.8
#     nameserver 8.8.4.4
# ADD HOST TO LOOKUP TABLE
sudo nano /etc/bind/jeffnet.lan.db
sudo nano /etc/bind/reverse.20.168.192.in-addr.arpa.db
# BIND
service bind9 status
sudo service bind9 restart
# SOME CHECKS
ping stimpy
ping facebook.com
dig stimpy.jeffnet.lan
dig facebook.com
ssh jeff@stimpy
nslookup stimpy
nslookup facebook.com
```

Table of Contents,

* [WHY DO WE NEED A LOCAL DNS SERVER](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#why-do-we-need-a-local-dns-server)
* [WHAT DNS IS YOUR MACHINE USING](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#what-dns-is-your-machine-using)
* [INSTAL BIND (DNS SERVER)](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#instal-bind-dns-server)
* [CONFIGURE PRIMARY DNS SERVER](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#configure-primary-dns-server)
  * [CONFIGURE named.conf](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#configure-namedconf)
  * [CONFIGURE named.conf.options](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#configure-namedconfoptions)
  * [CONFIGURE named.conf.local](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#configure-namedconflocal)
  * [CONFIGURE named.conf.default.zones](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#configure-namedconfdefaultzones)
* [CONFIGURE SECONDARY DNS SERVER](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#configure-secondary-dns-server)
* [VERIFY & START BIND](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#verify--start-bind)
* [CONFIGURE YOUR CLIENTS FOR DNS](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#configure-your-clients-for-dns)
  * [UBUNTU 18.04](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#ubuntu-1804)
  * [UBUNTU 16.04](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#ubuntu-1604)
  * [RASPBIAN](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#raspbian)<commit_msg>updated dns<commit_after># CREATE DNS SERVER USING BIND

_How to create a dns server using bind on linux._

tl;dr,

```bash
# ON DNS SERVER
tail -f /var/log/dns.jeffs-query.log
# ON EACH MACHINE / CLIENT
cat /etc/resolv.conf
# The ultimate goal is to have,
#     search jeffnet.lan
#     nameserver 192.168.20.110
#     nameserver 8.8.8.8
#     nameserver 8.8.4.4
# ADD HOST TO LOOKUP TABLE
sudo nano /etc/bind/jeffnet.lan.db
sudo nano /etc/bind/reverse.20.168.192.in-addr.arpa.db
# BIND
service bind9 status
sudo service bind9 restart
# SOME CHECKS
ping stimpy
ping facebook.com
dig stimpy.jeffnet.lan
dig facebook.com
ssh jeff@stimpy
nslookup stimpy
nslookup facebook.com
```

Table of Contents,

* [WHY DO WE NEED A LOCAL DNS SERVER](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#why-do-we-need-a-local-dns-server) 
* [WHAT DNS IS YOUR MACHINE USING](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#what-dns-is-your-machine-using)
* [INSTAL BIND (DNS SERVER)](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#instal-bind-dns-server)
* [CONFIGURE PRIMARY DNS SERVER](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#configure-primary-dns-server)
  * [CONFIGURE named.conf](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#configure-namedconf)
  * [CONFIGURE named.conf.options](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#configure-namedconfoptions)
  * [CONFIGURE named.conf.local](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#configure-namedconflocal)
  * [CONFIGURE named.conf.default.zones](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#configure-namedconfdefaultzones)
* [CONFIGURE SECONDARY DNS SERVER](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#configure-secondary-dns-server)
* [VERIFY & START BIND](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#verify--start-bind)
* [CONFIGURE YOUR CLIENTS FOR DNS](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#configure-your-clients-for-dns)
  * [UBUNTU](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#ubuntu)
  * [RASPBIAN](https://github.com/JeffDeCola/my-cheat-sheets/tree/master/software/development/operating-systems/linux/dns-cheat-sheet/create-dns-server-using-bind.md#raspbian)
{'fraction_non_alphanumeric': 0.14841395148557485, 'fraction_numerical': 0.010621501363571121, 'mean_word_length': 4.97598627787307, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 27, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3233428', 'n_tokens_mistral': 2787, 'n_tokens_neox': 2499, 'n_words': 255}