Open VRF Module in Linux

Recently, I installed a new router and found that the VRF module did not load successfully because I was using the image provided by the service provider. root@eu-router:/opt/tunnel# modprobe vrf modprobe: FATAL: Module vrf not found in directory /lib/modules/5.4.0-72-generic My Linux Kernel is 5.4.0-72-generic, so I installed the extension package. apt install linux-modules-extra-`uname -r` Then, load the VRF module again. If there is no response, it means that it was successful!...

July 6, 2021 · SteveYi

Using AS-SET to build filters

Recently, in order to establish BGP Peers with some friends who are new to the field, I also taught them how to use AS-SET for filtering. What is AS-SET AS-SET is an object that can add ASN and AS-SET. Usually used to filter routes exchanged through the BGP protocol. (such as BGP Peer Neighbor, Internet Exchange Route Server, etc.) We usually query all Route Objects in this AS-SET through Whois and recursion....

June 27, 2021 · SteveYi

Setting up Policy Based Routing with FRRouting

A few days ago, I was adjusting the network architecture in my lab to allow everything to go out through VPN and access my intranet. This led me to research Policy Based Routing (PBR). I initially used VRF (Layer 3 switching) to isolate my network, but this prevented me from running my services on the VRF interface. This meant that I couldn’t set up DoH on the router. Later, I discovered that I could use other methods to achieve PBR without using VRF....

May 18, 2021 · SteveYi

Optimizing Intranet with OSPF and BGP

For a long time, my friends and I have had an intranet similar to DN42. We use VPN to establish BGP connections and deploy this intranet using various devices in different areas. P.S. Currently, there are about 46 routes. Currently, I am building a BGP peer with other people from one point and using static routes to handle internal routing. For example, if the device 10.121.23.242 wants to reach a device 10....

May 16, 2021 · SteveYi

Solving the 53 Port Occupancy Issue on Ubuntu

Recently, in order to install a DoH Client on my router and set up a DNS server for internal network devices, I found that Ubuntu often uses port 53. After checking, I found that this was caused by systemd-resolve, so I found these methods to disable it! Before that, if you find that port 53 is being used, you can use the following command to see which process is using it....

May 12, 2021 · SteveYi

Set .tmpl files as HTML syntax in VSCode

When I started learning Golang recently, I used .tmpl as a web template. However, I found that it couldn’t handle formatting automatically like HTML files. P.S. Even with related plugins installed, it only processes .html files. After checking some related documents, I found that I can modify user settings to handle it. Here are two methods: The first method is to directly modify the settings.json file and add the following code at the bottom:...

April 25, 2021 · SteveYi

Hosting a Minecraft Server on Linux

Recently, a friend of mine wanted to set up a Minecraft server on Linux, so I decided to write down the process here! Environment In this setup, I used the following operating system and packages: Ubuntu 20.04 Server byobu openjdk-8-jdk spigot 1.16.5 Update System and Install Packages To update the system, we enter the following command: apt update -y apt upgrade -y Next, install Java and Byobu: apt install openjdk-8-jdk byobu -y Deploy Minecraft Server First, we create a folder to place the server files:...

April 12, 2021 · SteveYi

Installing DHCP Server on Linux

I often use Linux systems as routers for the simple reason that virtual machines require them. But I thought, since I’m doing it anyway, why not write a blog post about it? So… let’s get started with the installation! Installing isc-dhcp-server First, we need to install a package called isc-dhcp-server. sudo apt install isc-dhcp-server Configuring DHCP Server After installation, we need to edit the configuration file /etc/dhcp/dhcpd.conf. Here’s an example:...

April 11, 2021 · SteveYi

Pin Any Tweet on Your Twitter Profile

Today, while browsing Twitter, I came across an interesting tweet… So I immediately shared it with @edisonlee55 It’s obvious that this person has retweeted someone else’s tweet and pinned it to their own profile page. This seems normal, but in fact, “we can only pin tweets that we ourselves have posted.” When we click on a tweet that we retweeted, we don’t see the “pin tweet” option. So… we need a little trick!...

April 7, 2021 · SteveYi

Setting up NAT on iptables

Recently, Xiaoyi installed Ubuntu 20.04 on a computer at home and used it as a soft router. But Xiaoyi found that the computer couldn’t connect to the internet! After using mtr to trace the route, we found that the route could not go beyond the Gateway. So we captured packets on the router and found that our internal IP was sent to the ISP, but there was no response. If the ISP hasn’t configured it properly, it can easily lead to IP Spoofing....

March 8, 2021 · SteveYi