Raspberry Pi 2 as a Tailscale Exit Node for Home Network
Please Select a Licence from the LICENCE_HEADERS page |
And place at top of your page |
If no Licence is Selected/Appended, Default will be CC0 Default Licence IF there is no Licence placed below this notice!
When you edit this page, you agree to release your contribution under the CC0 Licence LICENCE:
More information about the cc0 licence can be found here: You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission. Licence: Statement of Purpose The laws of most jurisdictions throughout the world automatically confer exclusive Copyright and Related Rights (defined below) upon the creator and subsequent owner(s) (each and all, an "owner") of an original work of authorship and/or a database (each, a "Work"). Certain owners wish to permanently relinquish those rights to a Work for the purpose of contributing to a commons of creative, cultural and scientific works ("Commons") that the public can reliably and without fear of later claims of infringement build upon, modify, incorporate in other works, reuse and redistribute as freely as possible in any form whatsoever and for any purposes, including without limitation commercial purposes. These owners may contribute to the Commons to promote the ideal of a free culture and the further production of creative, cultural and scientific works, or to gain reputation or greater distribution for their Work in part through the use and efforts of others. For these and/or other purposes and motivations, and without any expectation of additional consideration or compensation, the person associating CC0 with a Work (the "Affirmer"), to the extent that he or she is an owner of Copyright and Related Rights in the Work, voluntarily elects to apply CC0 to the Work and publicly distribute the Work under its terms, with knowledge of his or her Copyright and Related Rights in the Work and the meaning and intended legal effect of CC0 on those rights. 1. Copyright and Related Rights. A Work made available under CC0 may be protected by copyright and related or neighboring rights ("Copyright and Related Rights"). Copyright and Related Rights include, but are not limited to, the following: the right to reproduce, adapt, distribute, perform, display, communicate, and translate a Work; moral rights retained by the original author(s) and/or performer(s); publicity and privacy rights pertaining to a person's image or likeness depicted in a Work; rights protecting against unfair competition in regards to a Work, subject to the limitations in paragraph 4(a), below; rights protecting the extraction, dissemination, use and reuse of data in a Work; database rights (such as those arising under Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, and under any national implementation thereof, including any amended or successor version of such directive); and other similar, equivalent or corresponding rights throughout the world based on applicable law or treaty, and any national implementations thereof. 2. Waiver. To the greatest extent permitted by, but not in contravention of, applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and unconditionally waives, abandons, and surrenders all of Affirmer's Copyright and Related Rights and associated claims and causes of action, whether now known or unknown (including existing as well as future claims and causes of action), in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each member of the public at large and to the detriment of Affirmer's heirs and successors, fully intending that such Waiver shall not be subject to revocation, rescission, cancellation, termination, or any other legal or equitable action to disrupt the quiet enjoyment of the Work by the public as contemplated by Affirmer's express Statement of Purpose. 3. Public License Fallback. Should any part of the Waiver for any reason be judged legally invalid or ineffective under applicable law, then the Waiver shall be preserved to the maximum extent permitted taking into account Affirmer's express Statement of Purpose. In addition, to the extent the Waiver is so judged Affirmer hereby grants to each affected person a royalty-free, non transferable, non sublicensable, non exclusive, irrevocable and unconditional license to exercise Affirmer's Copyright and Related Rights in the Work (i) in all territories worldwide, (ii) for the maximum duration provided by applicable law or treaty (including future time extensions), (iii) in any current or future medium and for any number of copies, and (iv) for any purpose whatsoever, including without limitation commercial, advertising or promotional purposes (the "License"). The License shall be deemed effective as of the date CC0 was applied by Affirmer to the Work. Should any part of the License for any reason be judged legally invalid or ineffective under applicable law, such partial invalidity or ineffectiveness shall not invalidate the remainder of the License, and in such case Affirmer hereby affirms that he or she will not (i) exercise any of his or her remaining Copyright and Related Rights in the Work or (ii) assert any associated claims and causes of action with respect to the Work, in either case contrary to Affirmer's express Statement of Purpose. 4. Limitations and Disclaimers. No trademark or patent rights held by Affirmer are waived, abandoned, surrendered, licensed or otherwise affected by this document. Affirmer offers the Work as-is and makes no representations or warranties of any kind concerning the Work, express, implied, statutory or otherwise, including without limitation warranties of title, merchantability, fitness for a particular purpose, non infringement, or the absence of latent or other defects, accuracy, or the present or absence of errors, whether or not discoverable, all to the greatest extent permissible under applicable law. Affirmer disclaims responsibility for clearing rights of other persons that may apply to the Work or any use thereof, including without limitation any person's Copyright and Related Rights in the Work. Further, Affirmer disclaims responsibility for obtaining any necessary consents, permissions or other rights required for any use of the Work. Affirmer understands and acknowledges that Creative Commons is not a party to this document and has no duty or obligation with respect to this CC0 or use of the Work. |
Raspberry Pi 2 as a Tailscale Exit Node for Home Network
This tutorial guides you through turning a Raspberry Pi 2 (RPi2) into a Tailscale exit node for secure remote access to your home network. With this setup, you can log into your home servers, edit your local wiki, or access devices from anywhere using a headless Raspberry Pi 2. Keywords: Raspberry Pi 2 Tailscale setup, headless SSH, home VPN, nmap IP discovery.
Overview
Transform your Raspberry Pi 2 into a Tailscale node to create a DIY VPN for your home network. This guide covers enabling SSH at boot for headless login, finding the Pi’s IP with nmap
, and configuring Tailscale as an exit node for remote access to home servers and wikis.
Prerequisites
- Raspberry Pi 2 with power supply and microSD card
- Ubuntu laptop (for SSH and scanning)
- Internet connection
- Raspberry Pi Imager installed on your computer
Step 1: Enable SSH on Boot (Headless Setup)
Set up your Raspberry Pi 2 for headless login with SSH enabled at boot using the Raspberry Pi Imager.
- Download and open the Raspberry Pi Imager from raspberrypi.com/software/.
- Select your OS (e.g., Raspberry Pi OS Lite) and storage (microSD card).
- Click the "Edit Settings" button (gear icon or three dots).
- In the "General" tab, set a username and password.
- In the "Services" tab, check Enable SSH.
- Choose "Use password authentication" (or "public-key" if preferred).
- Click "Save" and write the image to the SD card.
This ensures your RPi2 is SSH-ready without a monitor—perfect for a headless Raspberry Pi setup.
Step 2: Find the Raspberry Pi IP with nmap
Locate your Raspberry Pi 2’s IP address on your home network using nmap
from an Ubuntu laptop.
Install nmap
sudo apt install nmap
Identify Your Router IP
ip route | grep default
Example output:
default via 192.168.0.1 dev wlp3s0 proto dhcp src 192.168.0.40 metric 600
- Router IP:
192.168.0.1
- Laptop IP:
192.168.0.40
Scan the Network
Scan your network before booting the Pi:
sudo nmap -sn 192.168.0.1/24
Example output:
Starting Nmap 7.94SVN ( https://nmap.org ) at 2025-03-03 10:07 GMT Nmap scan report for _gateway (192.168.0.1) Host is up (0.0038s latency). MAC Address: AC:F8:CC:DD:EE:FF (Arris Group) Nmap scan report for 192.168.0.40 Host is up. Nmap done: 256 IP addresses (12 hosts up) scanned in 2.68 seconds
Boot your Raspberry Pi 2, wait 2-3 minutes, and scan again:
sudo nmap -sn 192.168.0.1/24
New device appears:
Nmap scan report for 192.168.0.69 Host is up (0.015s latency). MAC Address: B8:17:CC:DD:CC:BB (Raspberry Pi Foundation)
- RPi2 IP:
192.168.0.69
(note this for SSH).
This nmap IP discovery method is ideal for headless Raspberry Pi projects.
Step 3: Set Up Tailscale on the Raspberry Pi 2
Log into your RPi2 and configure it as a Tailscale exit node for your home network.
SSH into the Pi
ssh $USER@192.168.0.69
Replace $USER
with the username set in Step 1.
Install Tailscale
Add Tailscale’s repository with these commands (run each line separately):
curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.noarmor.gpg | sudo tee /usr/share/keyrings/tailscale-archive-keyring.gpg >/dev/null
curl -fsSL https://pkgs.tailscale.com/stable/debian/bookworm.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
Update and install:
sudo apt update
sudo apt install tailscale
Enable IP Forwarding
Enable IP forwarding for the exit node (run each line):
echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.conf
echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p /etc/sysctl.conf
Start Tailscale as an Exit Node
Run Tailscale and advertise your home network:
sudo tailscale up --accept-routes --advertise-routes=192.168.0.0/24 --advertise-exit-node
Copy the authentication URL output, paste it into a browser, and log in with your Tailscale account.
Get the Tailscale IP:
tailscale ip -4
Example output: 100.115.103.24
(yours will differ).
Step 4: Connect from Your Laptop
Use your laptop as a Tailscale client to access your home network via the RPi2 exit node.
sudo tailscale up --exit-node=100.115.103.24 --exit-node-allow-lan-access
- Replace
100.115.103.24
with your Pi’s Tailscale IP.
To disconnect:
sudo tailscale down
Step 5: Test the Setup
Verify the exit node works:
curl ifconfig.me
Compare the IP when connected via your home Wi-Fi vs. a mobile hotspot. You should see your home public IP when using the exit node. Now, you can browse your local wiki, log into home servers, or access devices on 192.168.0.0/24
.
Troubleshooting
- SSH fails: Ensure the username/password match Step 1 settings.
- Tailscale not connecting: Check your Tailscale account and re-authenticate.
- IP not found: Re-run
nmap
or check your router’s DHCP list.
Conclusion
Your Raspberry Pi 2 is now a Tailscale exit node, providing secure remote access to your home network. This RPi2 Tailscale tutorial is perfect for DIY VPN enthusiasts wanting to access home servers or wikis from anywhere.
Keywords: Raspberry Pi 2 VPN, Tailscale home network, headless Pi setup, remote access tutorial.