Openwrt Install Tailscale for Secure Home Network

Author

Reads 1.3K

Smart home wireless network router device
Credit: pexels.com, Smart home wireless network router device

Installing Tailscale on OpenWRT is a game-changer for securing your home network. With Tailscale, you can easily set up a secure and private network for all your devices.

Tailscale is a zero-config VPN that works seamlessly with OpenWRT, making it a great choice for home networks. It's easy to install and configure, even for those who are not tech-savvy.

To get started, you'll need to enable the necessary packages in the OpenWRT package manager, including the Tailscale package. This can be done using the opkg install command.

By following these simple steps, you can enjoy a secure and private network for all your devices.

Additional reading: Install Golang Package

Installation

To install Tailscale on OpenWrt, you have a few options. You can install it from the official binary or use a package manager like opkg. However, be aware that the opkg package is outdated and has security issues.

If you choose to install from the official binary, you can download it from the official website and extract it to a location on your device. The binary will contain two core files: tailscale and tailscaled, which you'll need to move to the correct directories.

You can install Tailscale from the static binary by downloading it from the official website and extracting it to a location on your device. The extracted files will include tailscale and tailscaled, which you'll need to move to /usr/bin and /usr/sbin, respectively.

Install

A silver network router with multiple USB ports, perfect for small offices.
Credit: pexels.com, A silver network router with multiple USB ports, perfect for small offices.

To install Tailscale, you'll need to follow one of three methods, depending on your Linux distribution. If you're using OpenWrt, you can install Tailscale directly from the official binary.

You can download the static binary from the official Tailscale website, selecting the correct version for your device's CPU architecture. For example, if you have a Raspberry Pi 4, you'll need the arm64 version.

The downloaded binary will include the core executable files tailscale and tailscaled, which you'll need to place in specific directories: tailscale in /usr/bin and tailscaled in /usr/sbin. Don't worry about the systemd scripts, as OpenWrt doesn't support them.

To make Tailscale start automatically when your device boots, you'll need to set up init.d. This will ensure that the service is running smoothly without any extra effort on your part.

If you're using OpenWrt and have already installed an older version of Tailscale using opkg, you'll need to remove it first. This will help prevent any conflicts with the newer version you'll be installing. To do this, run the command opkg remove tailscale, which will remove the old version and its associated binaries.

Close-up of a hand adjusting network equipment in a data center.
Credit: pexels.com, Close-up of a hand adjusting network equipment in a data center.

However, be aware that removing the old version will leave behind two remaining binary files: /usr/bin/tailscale and /usr/sbin/tailscaled. You'll need to delete or replace these files with the new version from the official binary download.

Once you've removed the old version, you can proceed with installing the new version. This will ensure that your Tailscale installation is up-to-date and running smoothly.

ER605 Router Installation

To install your ER605 router, first, ensure you have the device and all its components, including the power cord, Ethernet cables, and the Quick Installation Guide.

The ER605 router is a dual-band device that supports both 2.4GHz and 5GHz frequency bands, allowing you to choose the best band for your device's connection speed.

Place the ER605 in a central location to ensure optimal Wi-Fi coverage throughout your home. This will help you avoid dead zones and ensure a stable connection.

Connect your modem to the ER605 router using an Ethernet cable, as specified in the Quick Installation Guide, to establish a wired connection between the two devices.

The ER605 router's firmware can be updated using the web-based interface, which can be accessed by typing the router's IP address in your web browser.

Take a look at this: How to Install Web Camera

Interface Configuration

Credit: youtube.com, How to Install Tailscale and AdGuard Home on OpenWRT - Step-by-Step Guide

To configure the interface for Tailscale, you'll need to add a new interface. Go to Network > Interfaces > Add New Interface and name it "tailscale". Click Save to apply the changes.

In the Firewall Settings tab, create a new zone for the tailscale interface. This is crucial for setting up the network properly.

Here's a quick rundown of the necessary steps:

  • Add a new interface named "tailscale" in the Network > Interfaces section.
  • Set the protocol to Unmanaged and the device to tailscale0.

Once you've set up the interface, you'll need to configure the Tailscale admin console. This involves setting up subnet routes and DNS settings for your Raspberry Pi.

Add Interface

Adding an interface is a straightforward process. You can create a new interface by going to Network > Interfaces > Add New Interface.

To name your interface, simply fill in the "Name" field. For example, you can name it "tailscale" as shown in Example 1.

Next, you need to configure the firewall settings for your new interface. This can be done by going to the Firewall Settings tab and clicking Save.

Credit: youtube.com, 02 Configuring Interfaces

If you want to isolate your LAN from Tailscale, you can create a dummy interface. To do this, add a new interface and name it "tlan" as shown in Example 2.

Here's a summary of the steps:

  • Name your interface (e.g. "tailscale")
  • Configure the firewall settings by going to the Firewall Settings tab and clicking Save
  • Create a dummy interface (optional) by adding a new interface and naming it "tlan"

You can also create an interface in a non-English language, such as Chinese. To do this, you can follow the steps shown in Example 3, which involves creating a new interface with the name "tailscale" and selecting the "Unmanaged" protocol.

Admin Console Settings

Once you've successfully connected your Raspberry Pi to Tailscale, you'll need to configure the admin console settings. This involves setting up Subnet routes & DNS in the Tailscale admin console.

After connecting your Raspberry Pi to Tailscale, you'll need to access the admin console for further configuration. This is a crucial step to ensure your setup is working as expected.

Setting up Subnet routes & DNS in the Tailscale admin console is a vital part of the configuration process. This will help you manage your network and ensure that your devices can communicate with each other seamlessly.

Firewall Configuration

Credit: youtube.com, Your network needs rules! // A Beginners Guide to Firewall Rules in OpenWrt, GL.iNet Slate

Before setting up Tailscale on OpenWrt, you should configure your firewall settings first.

You can do this by adding a new zone in LuCI's Network > Firewall > Zones section, and name it "tailscale".

Set the input, output, and forward rules to ACCEPT, and enable masquerading and MSS clamping.

Covered networks should be set to "tailscale", and you can also allow forward to destination zones like LAN and WAN if needed.

Allow forward from source zones should be set to LAN.

Network Configuration

Network Configuration is a crucial step in setting up Tailscale on OpenWRT. This involves configuring the network settings to allow for seamless integration with Tailscale.

First, ensure that your OpenWRT device has a valid IP address and is connected to a network. You can check this by looking at the device's network settings, as described in the "Device Setup" section.

To configure the network settings, access the LuCI web interface and navigate to the Network tab. From there, you can edit the network configuration to include the Tailscale VPN.

Advertise Routes

Credit: youtube.com, Support | Route Advertisement

Advertise Routes allow your OpenWRT router to route traffic to devices on your LAN via Tailscale. This is a powerful feature that enables seamless communication between devices on your local network.

By enabling Advertise Routes, you can ensure that your OpenWRT router directs traffic to the correct device, even if it's not directly connected to the router. This can be especially useful for devices that are connected to the network via a VPN or other intermediate connection.

In the context of OpenWRT, Advertise Routes are a key component of network configuration, allowing you to fine-tune how your router handles traffic.

DNS Configuration

To configure DNS, go to the Admin console's DNS page in Tailscale and add your self-hosted DNS server's IP address to the Nameservers setting. This will force all devices connecting to the Tailscale network to use your self-hosted DNS server.

You can do this because you've already set up subnet routes to expose your LAN's subnet to the Tailscale network. As a result, you can simply set the DNS server IP to your LAN IP, and AdGuardHome won't need to listen on the tailscale0 interface to provide DNS service.

For more insights, see: Comcast Xfinity Self Install Kit

Connection Testing

Credit: youtube.com, Subnet Routers | Tailscale Explained

To verify your Tailscale connection, start by installing and opening the Tailscale app on your phone. Turn off Wi-Fi and use mobile data instead.

Once you've logged in and connected, copy your OpenWRT Tailscale IP from the app. You can then paste it into your mobile browser to see the OpenWRT web interface.

To test your connection from your mobile device, reconnect to Tailscale and visit your router's local IP (e.g., 192.168.30.1) in the browser. If everything is set up correctly, you should see the OpenWRT interface.

For more insights, see: Install Youtube as App

6. Start

You'll need to start Tailscale to begin the connection testing process.

A login URL will be printed, so open it in your browser to authenticate. This is a crucial step, as it allows Tailscale to verify your identity.

If you're new to Tailscale, don't worry – you can register on the Tailscale website if it's your first time using the service.

Test Mobile Connection

To test your mobile connection, start by reconnecting to Tailscale on your phone. This will ensure you're connected to the network.

Credit: youtube.com, Test Stream #2: Testing Mobile Connection

Reconnect to Tailscale by opening the app, logging in, and enabling the exit node. The exit node allows your mobile device to use your router's broadband IP address.

Open a browser and search for "what is my IP." Your IP should now be your router's broadband IP address. This confirms that the exit node is working correctly.

To test the full tunnel VPN, disable the exit node and refresh the page. Your IP should now reflect your mobile network.

You can also test your mobile connection by visiting your router's local IP address in the browser. Try visiting 192.168.30.1 to see the OpenWRT interface.

Related reading: Test Installation Matomo

Panduan Lengkap Konfigurasi

To start with, you'll need to install the OpenWRT firmware on your router. This can be done by flashing the firmware using a tool like LuCI.

First, update the package list by running the command `opkg update`. This ensures that your package list is up-to-date.

Then, install the necessary packages by running the command `opkg install luci-ssl-openssl` and `opkg install openwrt-luci`. These packages will allow you to manage your router's settings and configure Tailscale.

Curious to learn more? Check out: Update Openwrt

Credit: youtube.com, Cara Install Tailscale Di Openwrt | Remot Jarak Jauh Openwrt Dengan tanpa kuota utama

Next, configure your router's network settings by running the command `uci set network.lan.ipaddr='192.168.1.1'` and `uci set network.lan.netmask='255.255.255.0'`. This sets the IP address and netmask for your local network.

After that, configure Tailscale by running the command `tailscale up`. This will start the Tailscale service and begin the configuration process.

Finally, verify that Tailscale is working correctly by running the command `tailscale status`. This will display the status of your Tailscale connection.

Desiree Feest

Senior Assigning Editor

Desiree Feest is an accomplished Assigning Editor with a passion for uncovering the latest trends and innovations in technology. With a keen eye for detail and a knack for identifying emerging stories, Desiree has successfully curated content across various article categories. Her expertise spans the realm of Azure, where she has covered topics such as Azure Data Studio and Azure Tools and Software.

Love What You Read? Stay Updated!

Join our community for insights, tips, and more.