• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1190
  • Last Modified:

This is in AIX,,How to activate or close the tcp ports in AIX

This is in AIX,,How to activate or close the tcp ports in AIX..Please provide me all the commands to view,to activate and to close the tcp port
1 Solution

a network port is called "open" when an application process is either listening on it or communicating over it with the appropriate partner application (partner = client or server, respectively).

So basically a port is opened or closed by starting/stopping the concerned application process.

If you have a third-party or homemade application you'll have to consult the appropriate documentation on how to start/stop it.

AIX's own ports are mostly handled during startup in /etc/rc.tcpip or by the super daemon inetd, whose configuration is in /etc/inetd.conf.

Check open ports by using netstat -a or lsof -i. If you don't have lsof already, it's available in the AIX toolbox.

You can use smitty to start/stop processes and to configure their future behaviour.

Issue smitty otherserv

1) Modify inetd's config by selecting "Super Daemon (inetd)" ->  "inetd Subservers"
Then use " Add an inetd Subserver" to have this process started now and after every reboot, or select  "Remove an inetd Subserver" to have it stopped now and in the future.

2) For processes not under control of inetd select the desired one (e.g. "rwhod subsystem")  then either select "Start Using the ... subsystem" or "Stop Using the ... subsystem"

Alternatively, you can edit the config files directly.

1) For inetd subsubservers, edit /etc/inetd.conf, comment or uncomment the line containing the desired subserver using a single "#", save the file and issue refresh -s inetd.
A typical line in that file might look like (active)
ftp     stream  tcp6    nowait  root    /usr/sbin/ftpd         ftpd
or (inactive)
#ftp     stream  tcp6    nowait  root    /usr/sbin/ftpd         ftpd

2) For the other subsystems, edit /etc/rc.tcpip, comment or uncomment the appropriate line and issue
stopsrc -s [subsystem] or startsrc -s [subsystem], depending on what you want to achieve (don't type the square brackets [ ])

A typical entry in this file looks like (active):
# Start up the aixmibd daemon
start /usr/sbin/aixmibd "$src_running"

or (inactive):
# Start up the aixmibd daemon
# start /usr/sbin/aixmibd "$src_running"

Control the effect of your changes by issuing anew netstat -a or lsof -i .

Good luck!


Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now