From 7ecce178e4b5ca0098c81202c63c737153a69bc2 Mon Sep 17 00:00:00 2001 From: tiyn Date: Tue, 14 Feb 2023 15:48:13 +0100 Subject: [PATCH] ip: get outside ip --- wiki/linux/ip.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/wiki/linux/ip.md b/wiki/linux/ip.md index 2e5e81e..266f1a1 100644 --- a/wiki/linux/ip.md +++ b/wiki/linux/ip.md @@ -27,3 +27,12 @@ Disabling works accordingly by running: ```sh ip link set wlan0 down ``` + +### Get Outside IP + +For VPN and other applications using a tunnel it can be useful to check the +outside IP of your system. +Together with `awk` only the outside IP address can be displayed. +This is done with the command `ip route get 1.2.3.4 | awk '{print $7}'`. +Alternatively it can be done without `awk` by simply running the command +`ip route get 1.2.3.4` and checking for the seventh column.