1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

Merge pull request #3800 from holta/iiab-vpn_status

Improve iiab-vpn command, to show status of each IP in a table (+ better tips!)
This commit is contained in:
A Holt 2024-09-18 15:14:04 -04:00 committed by GitHub
commit f21c4c0572
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -48,11 +48,15 @@ echo -e " hostname -I"
echo -e " tailscale ip"
echo -e " tailscale status"
echo -e " tailscale whois $(tailscale ip -1)"
echo -e " tailscale whois --json $(tailscale ip -1) | jq"
echo -e " tailscale whois --json $(tailscale ip -1) | jq .Node.Endpoints,.Node.Hostinfo"
echo -e " tailscale ping --verbose [IP or HOSTNAME]"
echo -e " tailscale status --json | grep -B3 tag:"
echo -e " tailscale status --json | jq"
echo -e " systemctl status tailscaled\n"
echo -e "\e[4mTo disconnect from VPN:\e[0m\n"
echo -e " tailscale down\n"
echo -e "\e[4mTo permanently log out of VPN:\e[0m\n"
echo -e " tailscale logout\n"
# More useful output than 'tailscale status'
echo -e "\e[44;1mVPN peers: (rightmost column = online/offline)\e[0m\n"
tailscale status --json | jq -r '.Self,.Peer[] | .Tags[] + " " + .TailscaleIPs[] + " " + .HostName + " " + .DNSName + " " + .OS + " " + .Relay + " " + (.Online|tostring)' | sort -V | column -t