Last active
December 23, 2022 08:03
-
-
Save tcpdump-examples/42d2caf239123dbd3a4cadb69dbeb999 to your computer and use it in GitHub Desktop.
Revisions
-
tcpdump-examples revised this gist
Dec 23, 2022 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ Reference: [3 Easy Ways to Find IP address in Linux](https://www.howtouselinux.com/post/check-ip-address-in-linux) Find private ip address for all network interfaces in Linux ``` ip a -
tcpdump-examples revised this gist
Dec 23, 2022 . No changes.There are no files selected for viewing
-
tcpdump-examples revised this gist
Dec 23, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ Reference: [3 Easy Ways to Find IP address in Linux](https://www.howtouselinux.com/post/check-ip-address-in-linux) Find private ip address for all network interfaces in Linux ``` ip a -
tcpdump-examples revised this gist
Dec 23, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ Reference: (3 Easy Ways to Find IP address in Linux)[https://www.howtouselinux.com/post/check-ip-address-in-linux] Find private ip address for all network interfaces in Linux ``` ip a -
tcpdump-examples revised this gist
Dec 23, 2022 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,5 @@ Reference: (3 Easy Ways to Find IP address in Linux)(https://www.howtouselinux.com/post/check-ip-address-in-linux) Find private ip address for all network interfaces in Linux ``` ip a @@ -20,4 +22,4 @@ Check public ip address in Linux ``` curl ifconfig.me/all dig +short myip.opendns.com @resolver1.opendns.com ``` -
tcpdump-examples created this gist
Dec 23, 2022 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ Find private ip address for all network interfaces in Linux ``` ip a ip addr ip address show ifconfig -a ``` Check private ip address for specific network interface in Linux ``` ip addr show dev eth1 ifconfig eth1 ``` Check private ip address in bash script ``` ip -4 -o a | cut -d ' ' -f 2,7 | cut -d '/' -f 1 ip -4 addr show eth0 | grep -oP "(?<=inet ).*(?=/)" ip addr show eth0 | grep inet | awk '{ print $2; }' | sed 's/\/.*$//' ``` Check public ip address in Linux ``` curl ifconfig.me/all dig +short myip.opendns.com @resolver1.opendns.com ```