Ubuntu-server-NATrouter

In this tutorial, I will detail how to setup an Ubuntu server as a NAT router.

The server has 2-network interfaces: enp0s3 (WAN) and enp0s8(LAN). NAT is enabled on the WAN-NIC. A DHCP-Server is installed and it leases IP-addresses to clients over server's enp0s8 interface.

SERVER SPECS

root@ubuntu-DHC-SVR-RTR:/home/tokunbo# lsb_release -a
NoContinue Reading:

bind9 debian

The following is a tutorial on how to install and configure a DNS server:

MY SERVER SPECS:
root@ubuntu-DNSSVR:/home/tokunbo# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.2 LTS
Release: 16.04
Codename: xenial

In my setup, my server-IP is the same as my DNS-server IP:

auto enp0s3
iface enp0s3 inet static
address 172.16.1.20
netmask 255.255.255.0
gatewayContinue Reading: