User Tools

Site Tools


pages:howtos:monit:monitoring_turn_stun_server

Monitoring turn & stun server

Sources

HowTo

Install coturn and disable it

apt -y install coturn
systemctl disable coturn
systemctl stop coturn

now turnutils_uclient can be used to check the connection to the turn server

turnutils_uclient -T -W <STATIC_AUTH_PASSWORD> <hostname.domain.tld>

0: Total connect time is 1
0: 2 connections are completed
0: start_mclient: msz=2, tot_send_msgs=0, tot_recv_msgs=0, tot_send_bytes ~ 0, tot_recv_bytes ~ 0
0: start_mclient: msz=2, tot_send_msgs=0, tot_recv_msgs=0, tot_send_bytes ~ 0, tot_recv_bytes ~ 0
1: start_mclient: msz=2, tot_send_msgs=0, tot_recv_msgs=0, tot_send_bytes ~ 0, tot_recv_bytes ~ 0
2: start_mclient: msz=2, tot_send_msgs=0, tot_recv_msgs=0, tot_send_bytes ~ 0, tot_recv_bytes ~ 0
3: start_mclient: msz=2, tot_send_msgs=5, tot_recv_msgs=5, tot_send_bytes ~ 500, tot_recv_bytes ~ 500
4: start_mclient: tot_send_msgs=10, tot_recv_msgs=10
4: start_mclient: tot_send_bytes ~ 1000, tot_recv_bytes ~ 1000
4: Total transmit time is 5
4: Total lost packets 0 (0.000000%), total send dropped 0 (0.000000%)
4: Average round trip delay 43.400000 ms; min = 24 ms, max = 72 ms
4: Average jitter 18.800000 ms; min = 4 ms, max = 48 ms

timeout 5 turnutils_stunclient -p 3478 hostname.domain.tld

using netcat, something like this should work for stun (see SO Link):

stunserver=hostname.domain.tld; stunport=3478; listenport=20000; echo -ne "\x00\x01\x00\x00YOGO\x59\x4f\x47\x4fSTACFLOW" | nc -u -p $listenport $stunserver $stunport -w 1; timeout 5 nc -l -u -p $listenport | head -c 32 | tail -c 4 | hexdump -e '/1 "%u" "."' | grep -o ".*[^.]" && echo yes-no-problem || echo "Error in Tun server:$stunserver:$stunport"


~~DISCUSSION~~

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
pages/howtos/monit/monitoring_turn_stun_server.txt · Last modified: 2021/12/09 23:24 by The Thing That Should Not Be