Add script to get country and region from wireguard connections
This commit is contained in:
parent
fd35f04c77
commit
46991d297d
1 changed files with 7 additions and 0 deletions
7
get-country-from-vpn-connections.sh
Normal file
7
get-country-from-vpn-connections.sh
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/sh
|
||||||
|
# 2019-09-09, Nico Schottelius
|
||||||
|
# Show countries / region of VPN clients connected with wireguard
|
||||||
|
|
||||||
|
for ip in $(wg | grep endpoint | sed -e 's/endpoint: //' -e 's/\(.*\):[0-9]*/\1/' -e 's/\[//' -e 's/\]//'); do
|
||||||
|
curl -s ipinfo.io/$ip | grep -e country -e region;
|
||||||
|
done
|
Loading…
Reference in a new issue