Update pruebaRed.sh
Signed-off-by: Manuel Vergara <manuel@vergaracarmona.es>
This commit is contained in:
parent
1458033d31
commit
f5762dbd00
100
src/pruebaRed.sh
100
src/pruebaRed.sh
@ -4,80 +4,84 @@
|
|||||||
|
|
||||||
# Conexión con google
|
# Conexión con google
|
||||||
|
|
||||||
echo -e "\n###################\nCONEXIÓN CON GOOGLE\n###################"
|
echo -e "\n###################\nCONEXIÓN CON GOOGLE\n###################"
|
||||||
response=$(ping -c 1 8.8.8.8 | grep '1 packets transmitted, 1 received')
|
response=$(ping -c 1 8.8.8.8 | grep '1 packets transmitted, 1 received')
|
||||||
|
|
||||||
if [ -n "$response" ]; then
|
if [ -n "$response" ]; then
|
||||||
echo "Conexión exitosa con 8.8.8.8"
|
echo "Conexión exitosa con 8.8.8.8"
|
||||||
else
|
else
|
||||||
echo "Error de conexión con 8.8.8.8"
|
echo "Error de conexión con 8.8.8.8"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# IP de la tarjeta de red ethernet
|
# IP de la tarjeta de red ethernet
|
||||||
echo -e "\n###############\nTARJETAS DE RED\n###############"
|
echo -e "\n###############\nTARJETAS DE RED\n###############"
|
||||||
echo -e "eno1"
|
echo -e "eno1"
|
||||||
ip_lan_ethernet_4=$(ip addr show eno1 | grep 'inet ' | awk '{print $2}')
|
ip_lan_ethernet_4=$(ip addr show eno1 | grep 'inet ' | awk '{print $2}')
|
||||||
if [ -z "$ip_lan_ethernet_4" ]
|
if [ -z "$ip_lan_ethernet_4" ]
|
||||||
then
|
then
|
||||||
echo -e "\tNO EXISTE IPv4"
|
echo -e "\tNO EXISTE IPv4"
|
||||||
else
|
else
|
||||||
echo -e "\tIPv4: $ip_lan_ethernet_4"
|
echo -e "\tIPv4: $ip_lan_ethernet_4"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ip_lan_ethernet_6=$(ip addr show eno1 | grep 'inet6' | awk '{print $2}')
|
ip_lan_ethernet_6=$(ip addr show eno1 | grep 'inet6' | awk '{print $2}')
|
||||||
if [ -z "$ip_lan_ethernet_6" ]
|
if [ -z "$ip_lan_ethernet_6" ]
|
||||||
then
|
then
|
||||||
echo -e "\tNO EXISTE IPv6"
|
echo -e "\tNO EXISTE IPv6"
|
||||||
else
|
else
|
||||||
echo -e "\tIPv6: $ip_lan_ethernet_6"
|
echo -e "\tIPv6: $ip_lan_ethernet_6"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# IP de la tarjeta de red wifi
|
# IP de la tarjeta de red wifi
|
||||||
echo -e "wlo1"
|
echo -e "wlo1"
|
||||||
ip_lan_wifi_4=$(ip addr show wlo1 | grep 'inet ' | awk '{print $2}')
|
ip_lan_wifi_4=$(ip addr show wlo1 | grep 'inet ' | awk '{print $2}')
|
||||||
if [ -z "$ip_lan_wifi_4" ]
|
if [ -z "$ip_lan_wifi_4" ]
|
||||||
then
|
then
|
||||||
echo -e "\tNO EXISTE IPv4"
|
echo -e "\tNO EXISTE IPv4"
|
||||||
else
|
else
|
||||||
echo -e "\tIPv4: $ip_lan_wifi_4"
|
echo -e "\tIPv4: $ip_lan_wifi_4"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ip_lan_wifi_6=$(ip addr show wlo1 | grep 'inet6' | awk '{print $2}')
|
ip_lan_wifi_6=$(ip addr show wlo1 | grep 'inet6' | awk '{print $2}')
|
||||||
if [ -z "$ip_lan_wifi_6" ]
|
if [ -z "$ip_lan_wifi_6" ]
|
||||||
then
|
then
|
||||||
echo -e "\tNO EXISTE IPv6"
|
echo -e "\tNO EXISTE IPv6"
|
||||||
else
|
else
|
||||||
echo -e "\tIPv6: $ip_lan_wifi_6"
|
echo -e "\tIPv6: $ip_lan_wifi_6"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
# IP pública
|
# IP pública
|
||||||
echo -e "\n###########\nINFO IP WAN\n###########"
|
echo -e "\n###########\nINFO IP WAN\n###########"
|
||||||
curl -s https://ipinfo.io | jq
|
curl -s https://ipinfo.io | jq
|
||||||
|
|
||||||
# Estado VPN
|
# Estado VPN
|
||||||
echo -e "\n##############\nESTADO NORDVPN\n##############"
|
echo -e "\n##############\nESTADO NORDVPN\n##############"
|
||||||
nordvpn status | grep -v "New feature"
|
nordvpn status | grep -v "New feature"
|
||||||
|
|
||||||
# test de velocidad
|
# test de velocidad
|
||||||
echo -e "\n#################\nTEST DE VELOCIDAD\n#################"
|
echo -e "\n#################\nTEST DE VELOCIDAD\n#################"
|
||||||
speedtest
|
speedtest
|
||||||
|
|
||||||
# Verificación de sitios web
|
# Verificación de sitios web
|
||||||
echo -e "\n##########################\nVERIFICANDO ESTADO DE WEBS\n##########################"
|
echo -e "\n##########################\nVERIFICANDO ESTADO DE WEBS\n##########################"
|
||||||
ping -c 1 vergaracarmona.es > /dev/null 2>&1
|
ping -c 1 vergaracarmona.es > /dev/null 2>&1
|
||||||
if [ $? -eq 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
echo -e "\tvergaracarmona.es está levantado"
|
echo -e "\tvergaracarmona.es está levantado"
|
||||||
else
|
else
|
||||||
echo -e "\tvergaracarmona.es está caído"
|
echo -e "\tvergaracarmona.es está caído"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ping -c 1 diariosenderista.es > /dev/null 2>&1
|
ping -c 1 diariosenderista.es > /dev/null 2>&1
|
||||||
if [ $? -eq 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
echo -e "\tdiariosenderista.es está levantado"
|
echo -e "\tdiariosenderista.es está levantado"
|
||||||
else
|
else
|
||||||
echo -e "\tdiariosenderista.es está caído"
|
echo -e "\tdiariosenderista.es está caído"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Traceroute
|
||||||
|
echo -e "\n##########\nTRACEROUTE\n##########"
|
||||||
|
mtr -c 3 -n -r 8.8.8.8
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user