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
|
||||
|
||||
echo -e "\n###################\nCONEXIÓN CON GOOGLE\n###################"
|
||||
response=$(ping -c 1 8.8.8.8 | grep '1 packets transmitted, 1 received')
|
||||
echo -e "\n###################\nCONEXIÓN CON GOOGLE\n###################"
|
||||
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"
|
||||
else
|
||||
else
|
||||
echo "Error de conexión con 8.8.8.8"
|
||||
fi
|
||||
fi
|
||||
|
||||
# IP de la tarjeta de red ethernet
|
||||
echo -e "\n###############\nTARJETAS DE RED\n###############"
|
||||
echo -e "eno1"
|
||||
ip_lan_ethernet_4=$(ip addr show eno1 | grep 'inet ' | awk '{print $2}')
|
||||
if [ -z "$ip_lan_ethernet_4" ]
|
||||
then
|
||||
# IP de la tarjeta de red ethernet
|
||||
echo -e "\n###############\nTARJETAS DE RED\n###############"
|
||||
echo -e "eno1"
|
||||
ip_lan_ethernet_4=$(ip addr show eno1 | grep 'inet ' | awk '{print $2}')
|
||||
if [ -z "$ip_lan_ethernet_4" ]
|
||||
then
|
||||
echo -e "\tNO EXISTE IPv4"
|
||||
else
|
||||
else
|
||||
echo -e "\tIPv4: $ip_lan_ethernet_4"
|
||||
fi
|
||||
fi
|
||||
|
||||
ip_lan_ethernet_6=$(ip addr show eno1 | grep 'inet6' | awk '{print $2}')
|
||||
if [ -z "$ip_lan_ethernet_6" ]
|
||||
then
|
||||
ip_lan_ethernet_6=$(ip addr show eno1 | grep 'inet6' | awk '{print $2}')
|
||||
if [ -z "$ip_lan_ethernet_6" ]
|
||||
then
|
||||
echo -e "\tNO EXISTE IPv6"
|
||||
else
|
||||
else
|
||||
echo -e "\tIPv6: $ip_lan_ethernet_6"
|
||||
fi
|
||||
fi
|
||||
|
||||
# IP de la tarjeta de red wifi
|
||||
echo -e "wlo1"
|
||||
ip_lan_wifi_4=$(ip addr show wlo1 | grep 'inet ' | awk '{print $2}')
|
||||
if [ -z "$ip_lan_wifi_4" ]
|
||||
then
|
||||
# IP de la tarjeta de red wifi
|
||||
echo -e "wlo1"
|
||||
ip_lan_wifi_4=$(ip addr show wlo1 | grep 'inet ' | awk '{print $2}')
|
||||
if [ -z "$ip_lan_wifi_4" ]
|
||||
then
|
||||
echo -e "\tNO EXISTE IPv4"
|
||||
else
|
||||
else
|
||||
echo -e "\tIPv4: $ip_lan_wifi_4"
|
||||
fi
|
||||
fi
|
||||
|
||||
ip_lan_wifi_6=$(ip addr show wlo1 | grep 'inet6' | awk '{print $2}')
|
||||
if [ -z "$ip_lan_wifi_6" ]
|
||||
then
|
||||
ip_lan_wifi_6=$(ip addr show wlo1 | grep 'inet6' | awk '{print $2}')
|
||||
if [ -z "$ip_lan_wifi_6" ]
|
||||
then
|
||||
echo -e "\tNO EXISTE IPv6"
|
||||
else
|
||||
else
|
||||
echo -e "\tIPv6: $ip_lan_wifi_6"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# IP pública
|
||||
echo -e "\n###########\nINFO IP WAN\n###########"
|
||||
curl -s https://ipinfo.io | jq
|
||||
# IP pública
|
||||
echo -e "\n###########\nINFO IP WAN\n###########"
|
||||
curl -s https://ipinfo.io | jq
|
||||
|
||||
# Estado VPN
|
||||
echo -e "\n##############\nESTADO NORDVPN\n##############"
|
||||
nordvpn status | grep -v "New feature"
|
||||
# Estado VPN
|
||||
echo -e "\n##############\nESTADO NORDVPN\n##############"
|
||||
nordvpn status | grep -v "New feature"
|
||||
|
||||
# test de velocidad
|
||||
echo -e "\n#################\nTEST DE VELOCIDAD\n#################"
|
||||
speedtest
|
||||
|
||||
# Verificación de sitios web
|
||||
echo -e "\n##########################\nVERIFICANDO ESTADO DE WEBS\n##########################"
|
||||
ping -c 1 vergaracarmona.es > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
# Verificación de sitios web
|
||||
echo -e "\n##########################\nVERIFICANDO ESTADO DE WEBS\n##########################"
|
||||
ping -c 1 vergaracarmona.es > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo -e "\tvergaracarmona.es está levantado"
|
||||
else
|
||||
else
|
||||
echo -e "\tvergaracarmona.es está caído"
|
||||
fi
|
||||
fi
|
||||
|
||||
ping -c 1 diariosenderista.es > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
ping -c 1 diariosenderista.es > /dev/null 2>&1
|
||||
if [ $? -eq 0 ]
|
||||
then
|
||||
echo -e "\tdiariosenderista.es está levantado"
|
||||
else
|
||||
else
|
||||
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