Skip to content

[FEATURE] Limit the Wi-Fi side to chosen networks or interfaces #332

Open

Description

@EricWardner

The problem

tetherd listens on 5134 on every interface/network, and it advertises _tether._tcp over mDNS on every interface too. So it can be up on random public networks you happen to be on, like a coffee shop or work.

What you would like instead

Can we make a setting where you can specify trusted networks?

Alternatives you tried

Right now I only start avahi and open the port on my home network with a NetworkManager script, which works but is a lot of plumbing.

For anyone interested

  1. Mark the trusted network. I tag it in NetworkManager: nmcli connection modify "<NAME>" connection.zone home
  2. Stop avahi from starting on its own (disable its service and socket via systemd or whatever your distro uses).
  3. Hook into network changes (I use a NetworkManager dispatcher script). When a marked network is connected, open 5134/tcp and 5353/udp in your firewall for that interface and start avahi. When it isn't, close them and stop avahi.

Activity

  1. added
    enhancement
    on Nov 22, 2026
  2. zackb commented on Nov 26, 2026

    @zackb
    Owner

    Yes, this is a good change. I am not sure what the UX should be. Should tether ask once on each network it wants to advertise on? Should it remain the current default and opt-in to this more secure version? I don't like that as much because advertising on public networks by default feels bad.

    Open to ideas.

  3. added
    help wanted
    on Nov 26, 2026
  4. EricWardner commented on Nov 26, 2026

    @EricWardner
    Author

    Hmmm yeah my gut says off by default. Treat new networks as untrusted. We could have it prompt to trust a network only when there's already a paired device (or when you start pairing a new one), so it doesn't get noisy on every network connect.

    Similarly, it might be worth only accepting pair_request while "Pair new device" is open, like Bluetooth discoverable mode. Right now it seems like anyone on public Wi-Fi can smash that port and trigger a pairing request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementhelp wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions