06-02-2011 10:23 PM
I have to close a port in my hpux box.
[root@caefr0p006 ~]# cat /etc/services | grep -i 7006
afs3-errors 7006/tcp # error interpretation service
afs3-errors 7006/udp # error interpretation service
[root@caefr0p006 ~]# netstat -an | grep -i 7006
tcp 0 0 0.0.0.0:7006 0.0.0.0:* LISTEN
tcp 0 0 184.108.40.206:7006 220.127.116.11:57767 TIME_WAIT
tcp 0 0 18.104.22.168:7006 22.214.171.124:57765 TIME_WAIT
tcp 0 0 126.96.36.199:7006 188.8.131.52:57764 TIME_WAIT
tcp 0 0 184.108.40.206:7006 220.127.116.11:57763 TIME_WAIT
tcp 0 0 18.104.22.168:7006 22.214.171.124:57762 TIME_WAIT
tcp 0 0 126.96.36.199:7006 188.8.131.52:57760 TIME_WAIT
tcp 0 0 184.108.40.206:7006 220.127.116.11:57759 TIME_WAIT
tcp 0 0 18.104.22.168:7006 22.214.171.124:57757 TIME_WAIT
tcp 0 0 126.96.36.199:7006 188.8.131.52:57756 TIME_WAIT
tcp 0 0 184.108.40.206:7006 220.127.116.11:57754 TIME_WAIT
tcp 0 0 18.104.22.168:7006 22.214.171.124:57751 TIME_WAIT
My application team is asking to release the port 7006 .
Iam not worked much on the ports side.
Cpould you pls guide me how to close the port as listed above?
waiting for help
Solved! Go to Solution.
06-02-2011 10:29 PM
Standard network configuration is for the network socket to close 60 seconds after even an abnormal termination of the process.
You might want to use lsof to figure out what application is using port 7006 and shut it down.
Shutting down the application is the way to go if you want that port released.
Owner of ISN Corporation
06-02-2011 10:40 PM
Well a quick google indicates that port 7006 is often used by BMC products such as Patrol or Control-M - if you have these on your system, you might want to stop/restart all the processes relating to that...
Also, do you know what the system with IP address 126.96.36.199 is and what it does? That might give you some clue as to what the processes holding the ports open are...
Otherwise you might want to get a copy of lsof:
lsof -i :7006
Should show you which processes have that port open
(I won't be surprised if the processe that have the port open are owned by the very application team that wants you to close them!)
06-03-2011 05:35 PM
06-04-2011 02:36 AM
Thanks much for your help.
Your answers are excellent and is worked.
What I actioned is:
killed the PID
And the port got closed successfully.