Operating System - HP-UX
1833875 Members
2586 Online
110063 Solutions
New Discussion

How to disable/enable port.

 
SOLVED
Go to solution
david_252
Frequent Advisor

How to disable/enable port.

Hi Team:

I would like to knoe how do i enable/disable a specific port. the port number is 7025 and we use it for a xemulation. how do i disable/enable this tcp port? It is not listed in /etc/services.

Thanks
David.
3 REPLIES 3
John Palmer
Honored Contributor

Re: How to disable/enable port.

Where do you want to enable/disable it on a firewall or a server?

If you mean on a server then enabling a port is done by running an application that opens the port, to disable you close the application.

You could use the Oracle Net8 listener as an example. Say it's configured to listen on port 1521, if the listener isn't running then port 1521 is 'disabled', run the listener and the port becomes 'enabled'.

You can use the command netstat to find out what ports are enabled, try netstat -an|grep LISTEN

Regards,
John
John Palmer
Honored Contributor
Solution

Re: How to disable/enable port.

By the way, /etc/services doesn't enable/disable ports, it provides a way of associating port names with the port number (a bit like /etc/hosts with IP addresses). You don't need to have anything in /etc/services in order to use a port by number.

Regards,
John
Christopher Caldwell
Honored Contributor

Re: How to disable/enable port.

Applications bind to ports - the applications don't necessarily care what's in /etc/services.

To disable/enable ports "firewall" style, look at things like ipfilter:
http://www.software.hp.com/ISS_products_list.html

Or get on intermediate network devices (routers) and add filters there.