Collection of Linux tools to deal with network issues
Last active
November 8, 2016 00:37
-
-
Save vkroz/1127ebb51cb632eae111 to your computer and use it in GitHub Desktop.
This file contains 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 characters
# nmap - Network exploration tool and security / port scanner | |
# ---------------------------------------------------------------------------- | |
# List ports in use | |
nmap localhost | |
nmap 192.168.11.22 | |
# endless loop | |
watch -n1 'sudo netstat -taupn' |
This file contains 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 characters
# Netcat is a simple Unix utility which reads and writes data across network connections | |
# ---------------------------------------------------------------------------- | |
# Test if a port on a remote system is reachable | |
# Will output 0 if port 123 is open, and 1 if it's closed. | |
nc 127.0.0.1 123 < /dev/null; echo $? | |
# Send arbitrary string to remote connection | |
echo "<13>1 - - - - [b9d9a9c4-11d5-4b15-844f-c7d0e4353983@41058] `date` This is the heartbeat message" | netcat -q 1 targethost 514 | |
echo "<13>1 - - - - [b9d9a9c4-11d5-4b15-844f-c7d0e4353983@41058] `date` ping" | nc -vv -w 4 targethost 514 |
This file contains 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 characters
# Connectting to office VPN | |
ssh-add ~/.ssh/id_rsa | |
ssh -A [email protected] |
This file contains 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 characters
# Other useful stuff | |
wireshark | |
tcpdump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment