GetMAC()
{
if [ -n "$1" ]; then
OID="00:16:3e"
RAND=$(echo $1 | md5sum | sed 's/\(..\)\(..\)\(..\).*/\1:\2:\3/')
echo "$OID:$RAND"
else
echo "ERROR: please supply hostname to create MAC address from, e.g.:"
echo " $FUNCNAME myhost"
fi
}
echo 00:16:3e$(gethostip 10.1.2.11 | awk '{ print tolower(substr($3,3)) }' |sed 's/.\{2\}/:&/g' )
read a list of IP addresses from a file and do a dig reverse look up
while read ip; do dig +noall +answer -x $ip; done < ip-list.txt
couldnt write a better tut myself…
ss -aunp (udp with process and all info)
ss -ltpn (tcp listeners with processes)
ss -ltpan (tcp with all and processe info )