From 8a56781180e3764a5a99407270d481730b9ade30 Mon Sep 17 00:00:00 2001 From: Joshua Pickard Date: Wed, 27 Sep 2023 14:19:41 +0000 Subject: [PATCH] Update 'README.md' --- README.md | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/README.md b/README.md index f97a9a1..55ddedb 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,47 @@ ufw allow from 192.168.1.10 to any port 22 proto tcp ufw allow in on tailscal0 to interfaceip port 22 from otherdeviceip ufw reset ``` +## Linux VLANs + +`sudo apt install vlan` + +Add the following lines to allow multiple VLANs to create routing tables: + +`echo "500 firsttable" | sudo tee -a /etc/iproute2/rt_tables` + +Load the 8021q kernel module: + +`sudo modprobe 8021q` + +Confirm the module is loaded: + +```bash +$ lsmod | grep 8021q +8021q 40960 0 +garp 16384 1 8021q +mrp 20480 1 8021q +``` + +`sudo nano /etc/network/interfaces` + +``` +# Source custom network configuration files +source /etc/network/interfaces.d/* + +# The loopback network interface +auto lo +iface lo inet loopback + +# The first VLAN interface +auto eno1.503 +iface eno1.503 inet static + address 172.20.20.10 + netmask 255.255.255.240 + gateway 172.20.20.1 + dns-nameservers 8.8.8.8 8.8.4.4 +``` + +`sudo ifup eno1.503` ## List ports Linux is listening on