• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1181
  • 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
0
aixtutorial
Asked:
aixtutorial
1 Solution
 
woolmilkporcCommented:
Hi,

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!

wmp

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

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