Open mr-elamin opened 3 weeks ago
Hi, my tunnel IP address is 10.1.0.2/24 the command:
ip addr | grep 10.1.0.2 | awk '{ print $NF }'
The output in my case would be:
inet 10.1.0.2/24 scope global tun0 inet 10.1.0.2/24 scope global tun1
This will result two values for the TUNNEL_INTERFACE
TUNNEL_INTERFACE=$(ip addr | grep 10.1.0.2 | awk '{ print $NF }') echo $TUNNEL_INTERFACE tun0 tun1
This will result the ping test to go through tun0 not through tun1 and the ping will fail.
FIX: TUNNEL_INTERFACE=$(ip addr | grep 10.1.0.2 | awk 'END{ print $NF }') after the change:
Hi, my tunnel IP address is 10.1.0.2/24 the command:
ip addr | grep 10.1.0.2 | awk '{ print $NF }'
The output in my case would be:
This will result two values for the TUNNEL_INTERFACE
TUNNEL_INTERFACE=$(ip addr | grep 10.1.0.2 | awk '{ print $NF }') echo $TUNNEL_INTERFACE tun0 tun1
This will result the ping test to go through tun0 not through tun1 and the ping will fail.
FIX: TUNNEL_INTERFACE=$(ip addr | grep 10.1.0.2 | awk 'END{ print $NF }') after the change: