Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening ports

Status
Not open for further replies.

nitinkgoud

IS-IT--Management
Jun 28, 2006
87
0
0
US
Hi Guys,
I want to check which ports are open.
And how do i open closed ports?
I am running solaris 8.
 
You should download lsof if you don't already have it.

ftp://ftp.sunfreeware.com/pub/freeware/sparc/8/lsof-4.74-sol8-sparc-local.gz

After it's installed just run:

lsof|grep -i listen

If you see something you want to stop you can run

lsof|awk '/LISTEN/{print $2}'|xargs kill -9

That will only stop it from running at that time, not on a reboot (start time)

perl -e 'print $i=pack(c5,(40*2),sqrt(7600),(unpack(c,Q)-3+1+3+3-7),oct(104),10,oct(101));'
 
Or, more simply, netstat -a and look for LISTEN.

You usually open closed ports by starting a piece of software that listens on that port. For example, to open port 22 for SSH you would start the sshd process.

Also some ports can be opened by configuring inetd (or xinetd, depending on OS), see the man page for details.

Annihilannic.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top