talking to netbird

netbird api

list users

curl -s -X GET "$vpn/api/users" \
    -H 'Accept: application/json' \
    -H "Authorization: Token $token" | \
    jq > users.json

extract USER-ID USER-NAME USER-EMAIL

cat users.json | jq -r '.[] | .id + "," + .name + "," + .email' > users.csv

netbird store

alternative to grab netbird store

ssh -n -o visualhostkey=no netbird-srv "docker exec vpn_management_1 cat /var/lib/netbird/store.json" > store.json

extract `PEER-ID USER-ID PEER-NAME PEER-IP PEER-REMOTE-IP

jq -r '.Accounts.ACCOUNT-ID.Peers[] | "\(.ID),\(.UserID),\(.DNSLabel),\(.IP),\(.Location.ConnectionIP)"' store.json > store.csv

HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun