Sometimes you genuinely need public exposure: a webhook receiver from GitHub or Stripe, a demo URL to share with a non-tailnet user, a public-facing webhook your home automation triggers. Funnel makes this trivial. So trivial it's easy to do wrong.
The goal of this project is to build the discipline before the muscle: know before you turn on Funnel whether the service you're exposing is actually safe to publish. We pair the technical setup with a decision tree so you don't hand the internet a bad URL.
https://your-server.tail-abc.ts.net reachable from anywhereFunnel lets the public hit your URL — but the application layer (HMAC signature check) decides who actually gets a 200. That's why this is safe; that's why the decision tree exists.
Funnel is "Serve, but the door is open." Same syntax, vastly different audience. Before flipping the switch, run through the "Is it safe to expose?" decision tool for any service. If it comes out yellow or red, either don't Funnel it, or wrap it behind an auth layer first.
Open the decision tool and walk through it for the service you're considering. For this project's example (GitHub webhook receiver) the tree should land on green.
Discipline rule: don't proceed unless you can write down (literally) why your service is safe to public-expose.
Admin console → Access controls. Add (or merge) a nodeAttrs block:
{
"nodeAttrs": [
{ "target": ["autogroup:member"], "attr": ["funnel"] }
]
}
Save. This permits any tailnet member to use Funnel.
SSH into your home server. Create ~/webhook/server.py:
import hmac, hashlib, os, json
from http.server import HTTPServer, BaseHTTPRequestHandler
SECRET = os.environ['GH_SECRET'].encode()
class H(BaseHTTPRequestHandler):
def do_POST(self):
sig = self.headers.get('X-Hub-Signature-256', '')
body = self.rfile.read(int(self.headers['Content-Length']))
expected = 'sha256=' + hmac.new(SECRET, body, hashlib.sha256).hexdigest()
if not hmac.compare_digest(sig, expected):
self.send_response(401); self.end_headers(); return
event = self.headers.get('X-GitHub-Event', '?')
print(f"event: {event}", flush=True)
print(json.loads(body).get('repository', {}).get('full_name', '-'), flush=True)
self.send_response(200); self.end_headers(); self.wfile.write(b'ok')
HTTPServer(('127.0.0.1', 9000), H).serve_forever()
Run it:
export GH_SECRET="$(openssl rand -hex 32)"
echo $GH_SECRET # save this — you'll paste into GitHub
python3 ~/webhook/server.py
In another SSH session:
sudo tailscale funnel --bg http://localhost:9000
Output: a public URL like https://home-server.tail-abc.ts.net/. This is reachable from anywhere on the internet, with HTTPS already set up.
In your GitHub repo: Settings → Webhooks → Add webhook.
application/jsonSave. GitHub immediately sends a "ping" event. If your script prints event: ping, you're good.
sudo tailscale funnel --https=443 off
Or remove the funnel attr from nodeAttrs in policy to disable Funnel across the whole tailnet — the kill switch.
.ts.net hostnames discoverable — "no one will know the URL" is not a security model