PDA

View Full Version : Check who's IPs is connected to you


priencess_fiona
20-06-2006, 10:21 AM
Check who's IPs is connected to you
I stumbled across this on another board, and I found it so simple, yet helpful, I thought I'd share this with you.

All you have to do is:

- open notepad
- copy the following lines

@echo
@color 09
@netstat -n
@echo.
@pause

- save as getip.cmd
- move it to the desktop (or anywhere that catches your fancy)
- double-click on it to see the current TCP connections made to your PC!

change the netstat -n (the -n displays the info as numerical data) to netstat -a which will show all connections and listening ports. Also, putting a number in between the netstat and the -a will update at that interval. For instance, netstat 1 -a will update the info every 1 second, netstat 5 -a will update every 5 seconds and so on... If you don't want to use the -a option, you can still use the update interval with the -n option (example: netstat 5 -n)

You can also use these switches
netstat -a (display all active TCp connections and their ports)
netstat -e (displays ethernet stats)
netstat -n (displays active TCP connections)
netstat -s (displays statistics by protocol)
netstat -p protocol (shows connections for the protocol specified eg tcp, udp, tcpv6 or udpv6)
netstat -r (displays contents of the IP routing table)

The color command is followed by 2 hexadecimals, i think the first is text color and the 2nd is background color (or vice versa)

aliff
20-06-2006, 01:57 PM
good post ..:D @princess... just want to add one thing

for netstats.. to get a complete list of paramaters along with description ( -a, -n, .etc).. go to command prompt..
( Start > Run .. type cmd and ENTER).. and type the following in dos..

netstat /? (note there will be a space between netstat and '/')

Then hit ENTER

u will see the full description of all the options of netstats..along with details of what each options does :)