Instantly share code, notes, and snippets.

Embed
What would you like to do?
View established connections with hostnames
#!/bin/bash
netstat -tunlap | awk '{print $5}' | grep [0-9] | egrep -v '(127|0).0.0.*|::1'| awk -F ':' '{print $1}' | sort -u | xargs -n 1 host
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment