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

Posted on 2009-12-19
Last Modified: 2013-12-21
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
Question by:aixtutorial
    1 Comment
    LVL 68

    Accepted 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!



    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Join & Write a Comment

    FreeBSD on EC2 FreeBSD ( is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
    Why Shell Scripting? Shell scripting is a powerful method of accessing UNIX systems and it is very flexible. Shell scripts are required when we want to execute a sequence of commands in Unix flavored operating systems. “Shell” is the command line i…
    Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
    Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now