A router is defined as a system that performs the following duties:
The following interfaces are needed:
echo 'net.inet.ip.forwarding=1' >> /etc/sysctl.conf
Set an IP Address for the device.
Either DHCP or a Static IP.
Configure the WiFi Network.
The DHCP resolver should be started at boot time to provide client machines with local IP addresses.
Example for DHCP servers include:
NOTE: Any RFC 1918 address space may be specified here.
Usually there is an option to point to the local DNS server.
Configure Firewall with:
NOTE: Unroutable addresses include:
<code> 0.0.0.0/8 10.0.0.0/8 127.0.0.0/8 169.254.0.0/16 172.16.0.0/12 192.168.0.0/16 <code>
A DNS cache is recommended.
An example configuration would include:
server: interface: 192.168.1.1 interface: 192.168.2.1 interface: 127.0.0.1 access-control: 192.168.1.0/24 allow access-control: 192.168.2.0/24 allow do-not-query-localhost: no hide-identity: yes hide-version: yes forward-zone: name: "." forward-addr: 1.2.3.4 # IP of the upstream resolver.
NOTE: The above configuration assumes that the 192.168.1.0/24 subnet is used for the wired clients and 192.168.2.0/24 for the wireless.
nameserver 127.0.0.1 nameserver 1.2.3.4 search localdomain
NOTE:
Reboot the system.