Identificare le interfacce di rete


Eseguire questo comando:


SAVEIFS=$IFS; IFS=$(echo -en "\n\b"); for ENTRY in $(ip -4 -o address | awk '{print $2,$4}' | grep -v 'lo 127.0.0.1' ); do INTERFACE=$(echo $ENTRY | awk '{print $1}'); IP=$(echo $ENTRY | awk '{print $2}' | cut -d/ -f1); echo -n "$INTERFACE " ; echo -ne "\x00\x01\x00\x00YOGO\x59\x4f\x47\x4fSTACFLOW" | nc -u -p 20000 stun1.l.google.com 19302 -w 1 -s $IP -4  ; timeout 1 nc -l -u 20000 2>/dev/null | head -c 32 | tail -c 4 | hexdump -e '/1 "%u" "."' | grep -o ".*[^.]" ; done; IFS=$SAVEIFS


verranno elencate le interfacce coi rispettivi IP, esempio:


eth0 80.17.99.73
eth1 Terminated


Sono buone le interfacce che riportano l'IP.

A questo punto si può procedere in 2 modi: abilitando o disabilitando le interfacce.


Disabilitazione delle interfacce


Seguendo l'esempio sopra si andrà a disabilitare l'interfaccia eth1:


config setprop janus-gateway ICEIgnoreList "eth1"
signal-event nethserver-janus-update

Abilitazione delle interfacce


Seguendo l'esempio sopra si andrà ad abilitare l'interfaccia eth0:


config setprop janus-gateway ICEEnforceList "eth0"
signal-event nethserver-janus-update



Altre info


https://nethvoice.docs.nethesis.it/it/v14/howto.html#product-cti-configurazione-softphone-webrtc