LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-29-2024, 12:46 PM   #1
mazzo
Member
 
Registered: Jun 2003
Location: Thames Valley, UK
Distribution: RedHat from 4 -9, Fedora, Ubuntu, Centos 3 - 7, Puppy Linux, and lots of raspberry pi
Posts: 142

Rep: Reputation: 15
Travel router (Raspberry Pi) using hostapd and tailscale - not working


I have set up a tailnet with an exit node. The pi travel router is connected and is using the exit node locally (ie if I do a curl ifconfig.me it shows the exit node ip address).

It is providing dhcp connections through wifi and I can connect no problem. If I do not run tailscale, it serves the internet natively to any client that connects, however the moment I run tailscale up --exit-node=100.xx.xx.xx, it fails to server any internet. I can still connect to the wifi and get an local ip address and if I physically log into the pi, I am still able to ping google or do the ipconfig.me without issue.

So the problem is that the wifi is not passing anything to the eth0 connection (or possibly the tailscale0 connection). ipv4 forwarding is on.

I've fiddled with this for hours and end up getting into such a mess I need to rebuild the router again.

Setup: Pi running dietpi, with wifi hotspot app installed (basically hostapd) and tailscale client.

Any help would be very much appreciated. What little hair I have is being torn out!

Last edited by mazzo; 01-29-2024 at 12:47 PM.
 
Old 01-31-2024, 10:47 AM   #2
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,357
Blog Entries: 3

Rep: Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767Reputation: 3767
Which OS do you have on the Raspberry Pi? If it is the latest Raspberry Pi OS (bookworm) then you should probably use nmcli or similar to set up sharing.

Here's my guess:

Code:
sudo nmcli connection add con-name 'wlan0-static' \
    ifname wlan0 \
    ip4 10.51.100.1/24 \
    ipv4.method shared \
    autoconnect yes \
    type wifi \
    ssid ... \
    802-11-wireless.mode ap \
    802-11-wireless.band bg \
    802-11-wireless.channel 1 \
    wifi-sec.key-mgmt wpa-psk \
    wifi-sec.psk "...." 

sudo nmcli connection up wlan0-static
Where ... is the name of your WLAN and .... is the passphrase for it. That assumes eth0 for egress and wlan0 for the access point. For 2.4GHz choose only channels 1, 6, or 11 -- no others, as there will be overlap otherwise and that will slow you down worse than having to share the channel with another station. If you would prefer 5GHz then choose 'a' instead of 'bg' and pick an appropriate 5GHz channel.

Tailscale is a proprietary VPN, right?
 
  


Reply

Tags
hostapd, raspberrry pi, router



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
tailscale and pihole (on Raspberry Pi) - to be only available to some of my tailscale machines mazzo Linux - Networking 0 01-24-2024 02:45 PM
LXer: Encrypted tunneling with Tailscale and WireGuard LXer Syndicated Linux News 0 05-02-2020 05:00 PM
LXer: How to set up the Raspberry Pi Zero for travel LXer Syndicated Linux News 1 03-14-2020 06:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration