Repository navigation
Service Gateway
The main feature: let ordinary devices on your existing LAN use specific services on your tailnet — without a Tailscale client on those devices, without moving them to another Wi-Fi and without changing your router.
The LAN client connects to the ESP32's own LAN address and a listen port. The ESP32 admits the connection only if the rule is enabled and not expired, the source is inside the rule's CIDR and protocol and port match; then it carries it over WireGuard to the tailnet destination. The remote peer sees the gateway's tailnet identity, and its own ACLs still decide what it accepts.
Goal: an MQTT hub at 192.168.1.20 publishes to
broker.your-tailnet.ts.net:1883 on another site.
- Give the ESP32 a fixed LAN address (e.g.
192.168.1.50), join it to your tailnet and allow its identity to reach the broker in your tailnet ACL. - Status → Publish a Tailnet service (or Network → LAN → Tailnet). The guide checks the prerequisites and asks you to acknowledge the exposure.
- Add a rule: TCP, listen
18830, destinationbroker.your-tailnet.ts.net, port1883, source192.168.1.20/32. It is saved disabled. - Test destination: the ESP32 makes one bounded TCP handshake (2 s) with the broker through the tunnel, while the rule is still disabled.
- Enable the rule, optionally set an expiry, and point the hub at
192.168.1.50:18830. Any other LAN device trying that port is refused.
- Destination test result:
reachable,no_tcp_answer,udp_unverifiable,control_offline,unresolved… — each states what it does not prove. - Last accepted and rejected LAN packet, last reply from the service, and the peer path (direct, DERP relay or offline).
- Service watch (optional, off by default) repeats the test for enabled TCP rules and can notify through ntfy/MQTT.
- Rules can be exported and imported; imported rules are forced off.
Up to 8 rules. A source address is not an identity: restrict each rule to single devices and keep the peer's ACL tight. AP-side port forwarding is a separate feature for devices on the gateway's own Wi-Fi.
Full guide: SERVICE-GATEWAY.md · Troubleshooting rule states.
Start
Roles
- Service Gateway
- Subnet Router
- Exit Node
- Headscale
- Recovery and Wake-on-LAN
- Monitoring and Health
- Integrations
Operate
Reference
Project