CLI port shutdown command?

GixJim

n00b
Joined
Aug 13, 2003
Messages
39
is there a CLI command for shutting down or opening up a port?

if so what is it?


Thanks in advance
Jim
 
shutdown and no shutdown, maybe? :p

perhaps we could answer the question if you told us what vendor, model, and versions.
 
Sorry, I guess that would help.

In either XP or 2k Pro I want to be able to open the command prompt , list active/open ports and shutdown ports at my choosing. I use netstat -ao to list ports and PID's currently and I can stop the services but I want to be able to close ports at the command prompt.

Thanks
Jim
 
Ugh. I don't know about the command prompt, but you can do it in Network Properties in Advanced options. I'll make a more formal walk-through when I get home. I'm on Win2K here at work.
 
GixJim,

Generally ports can't be opened and closed in user mode. Applications use operating system calls which bind the application to a specific socket in the TCP/IP stack, which remains bound until either the application closes the port or the application is terminated.

If you are concerned about security issues of having open ports, there are two solutions:

1. Terminate the application using the port/disable the service
2. Use a firewall to block external access to these ports. They will still show as open in netstat, but inaccessible to the outside world.

There's a free utility called Fport by Foundstone Labs which functions like netstat but will map ports to running processes and tell you which applications are bound to open ports.
 
Bob no need for the write up, I know how it is done in GUI, but thanks anyways.

Boll thanks for the additional info, I will check out the Fport tool.

Thanks
Jim
 
Back
Top