Using WireGuard directly offers better performance than using Tailscale. Tailscale does more than WireGuard, so that will always be true. We aim to minimize that gap, and Tailscale generally offers good bandwidth and excellent latency, particularly compared to non-WireGuard VPNs.
執行指令登入到headscale 打開dos, 或是powershell (希望不用做這動作, 不然麻瓜會生氣) ** powershell or cmd run as administrator
cd C:\Program Files\Tailscale
tailscale login --login-server https://headscale.test.com --exit-node=<headscale ip 可為headscale server local ip> --exit-node-allow-lan-access=true
我打算用OPNsense取代目前老舊的硬體防火牆(Fortigate 80C) , 後來透過OPNsense 外掛, 試了suricata, AdGuard Home, tailcale , wireguard , 總共花了我2周的時間, 對於VPN, site to site , point to site 也都玩了一輪.
tailscale 做site to site 只能以NAT方式完成, 這會有問題, 以鼎新tiptop GP 5.1來說就無法回撥source ip 的6400 port ,算是假的site to site vpn , 就算官方宣稱加上 –snat-subnet-routes=false 可以辦到, 但我怎麼試都失敗, 網路上大部分也都不在意,看來tailscale使用群更專注在翻牆功能.
wireguard 設定檔簡單解釋如下, 檔案為/etc/wireguard/wg0.conf, 該設定檔可形成 site to site , 但我在Linux設定一直失敗, 只能用NAT方式,最後發現OPNsense才能做到真正的site to site 功能, 太怪了!
[Interface]
# Site A
# private key
PrivateKey = CG0svjlK7NdZ3U0MdYQzBHx7adDi1p2UlhPFXdH4HHw=
# Site A Tunnel IP
Address = 10.1.0.1/32
ListenPort = 51820
[Peer]
# Site B public key , tunnel ip 10.1.0.2/32
PublicKey = Jkdn621+amuCV8Wj7YQLMydtE9GO5kpq+oZdK/17XAY=
# 允許Site B內網, 以及Site B的tunnel ip
AllowedIPs = 10.1.0.2/32,10.176.5.0/24
Endpoint = <Site B 對外ip>:51820
PersistentKeepalive = 25
[Peer]
# Site C public key , tunnel ip 10.1.0.3/32
PublicKey = VaVaSY6SkizEhexj9vSTkzKgaIo5MwMnulu6I/D+iAI=
# 允許Site C內網, 以及Site C的tunnel ip
AllowedIPs = 10.1.0.3/32,192.1.0.0/22
Endpoint = <Site B 對外ip>:51820
PersistentKeepalive = 25
some pack files are missing from the repository, getting their blobs from the repository index: [c3622b51e9c118521af211cd3a98f580f5902824b6b665e62d61061acedbe71d]