From ec1f13cc336106e497575b5000cd5c5d37023a6b Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 19 Apr 2023 22:19:08 +0200 Subject: [PATCH] Display IP / Gateway --- run/network.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/run/network.sh b/run/network.sh index 2a9f378..86fdf26 100644 --- a/run/network.sh +++ b/run/network.sh @@ -128,8 +128,14 @@ fi [ ! -c /dev/net/tun ] && echo "Error: TUN network interface not available..." && exit 85 if [ "$DEBUG" = "Y" ]; then + + GATEWAY=$(ip r | grep default | awk '{print $3}') + IP=$(ip address show dev eth0 | grep inet | awk '/inet / { print $2 }' | cut -f1 -d/) + echo && ifconfig echo && ip route && echo + echo "IP: ${IP} GATEWAY: ${GATEWAY}" && echo + fi update-alternatives --set iptables /usr/sbin/iptables-legacy > /dev/null