Code Monkey home page Code Monkey logo

router's Introduction

Router

This repository contains the config files to build a simple Debian based router / firewall.

It is recommended to use Debian 10 or higher (due to nftables) and a machine with two or more ethernet ports.

Network

The configs are specific to my network so some things need to be updated or changed according to your setup.

Ports

I use a PC Engines APU2D4 as my router. It has the following ethernet ports:

  • enp1s0: WAN
  • enp2s0: LAN (Connected to a switch)
  • enp3s0: LAN (Connected to an AP)

VLANs

This VLAN configuration served me well for some time now but new VLANs can be added or not needed ones removed.

  • VLAN10: Management
  • VLAN11: Servers
  • VLAN20: General
  • VLAN30: Guest
  • VLAN40: Camera
  • VLAN50: IoT - Hue

IPv6

By following this setup you will add IPv6 support to VLAN10. If this is not wanted just do not install the wide-dhcpv6-client package and change the other configs accordingly.

Setup

We should make sure that the machine is up-to-date and contains at least an editor for us to work with. vim can be substituted by your editor of choice.

apt update
apt upgrade
apt install vim

Install packages

After everything is updated and installed, we can go ahead and add the router specific packages.

apt install vlan bridge-utils dnsmasq nftables wide-dhcpv6-client

These packages are required for the router to do the basic work.

  • vlan: ifupdown integration for vlan configuration
  • bridge-utils: Linux ethernet bridge configuration utilities
  • dnsmasq: DNS proxy and DHCP server
  • nftables: Packet filtering / firewall
  • wide-dhcpv6-client: DHCPv6 client for automatic IPv6 host configuration

Enable 8021q support

The last thing we have to do is enable 8021q support. It is the networking standard that supports virtual LANs on a network.

/usr/sbin/modprobe 8021q
echo '8021q' >> /etc/modules

Configs

The configs should be self-explanatory, if there are any questions just create an issue and I will try to answer / add the explanation to this README.

router's People

Contributors

dhenkes avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.