{"repo":"mzac/unifi-debian-tailscale-bgp","free":true,"listed":false,"github":"https://github.com/mzac/unifi-debian-tailscale-bgp","clone":"git clone https://github.com/mzac/unifi-debian-tailscale-bgp.git","description":"Tailscale subnet routing behind a UniFi Gateway using redundant Debian VMs with FRR + BGP","language":null,"stars":18,"topics":["routing","tailscale","ubiquiti","unifi","vpn","bgp","debian","frr","homelab","subnet-router"],"license":"GPL-3.0","category":"self-hosted-apps","readme_excerpt":"UniFi + Debian/FRR + Tailscale (BGP) Run Tailscale as a subnet router behind a UniFi Gateway using two redundant Debian VMs. FRR's bgpd peers with the UniFi Gateway over eBGP; BGP path attributes pick one VM as active and one as standby, and failover is automatic when the active VM drops its session. This repo used to document a pfSense + OSPF design. It has been rewritten end-to-end for Debian + FRR + eBGP. If you need the old guide, check out a commit before this rewrite — git history is intact. Architecture - ts-home1 (active) and ts-home2 (standby) are Debian 13 (Trixie) VMs running on separate Proxmox hosts. - ens18 is the WAN interface on VLAN 220 (DHCP). Tailscale uses this to reach the tailnet. - ens19 is the inside interface on VLAN 221 , a /24 BGP transit subnet. The UniFi Gateway peers with each VM across this VLAN. - The VMs are AS 65001 ; the UniFi Gateway is AS 65000 . eBGP exchanges exactly two aggregates: 192.168.0.0/16 (LAN) and 100.64.0.0/10 (Tailscale CGNAT). - The Tailscale daemon installs per-peer /32 routes inside the 100.64.0.0/10 aggregate. iptables masquerades LAN traffic to the VM's Tailscale IP on the way out so peers that haven't accepted your subnet routes can still send return traffic. BGP design Direction Prefix(es) Modifier Effect --- --- --- --- ts-home1 → UniFi Gateway 100.64.0.0/10 default attrs preferred at UniFi Gateway ts-home2 → UniFi Gateway 100.64.0.0/10 UniFi Gateway applies local-preference 50 (inbound) demoted at UniFi Gateway UniFi","default_branch":null,"files":null,"tree":[],"storefront":"/r/mzac","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mzac/unifi-debian-tailscale-bgp/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}