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:

hostonlyadapter1

Virtualbox's "host only adapter" setting is useful if you want to create a network containing your host OS and several virtual machines.

The "No Host only adapter selected error" appears if no host-only adapter has been configured.

To fix this issue, shut down your running guest OS.

Goto Virtualbox's mainContinue Reading:

vbox-disk-writeprotect2

Virtualbox error: disk is write protected, files can't be saved on a write protected disk:

You might experience this error if you just setup VirtualBox. In my setup, I have a Linux host and a Windows guest. Below is the error screenshot on the guest OS.

I got this errorContinue Reading: