how can I check the availability of a port? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

how can I check the availability of a port?

gogogogo Posts: 120Member
Hi,

I want to know how to open the telnet and ftp ports for remote access.
Do I need to setup the telnet server? if so, how?
Also, how can I check which port is open and which one is closed?

I am running redhat 7.0.

Thanks

gogo

Comments

  • gautamgautam Posts: 642Member
    Its done through /etc/inetd.conf, some distributions use xinetd and I suppose it would be /etc/xinetd/xinetd.conf or /etc/xinetd.conf(not sure), you just have to do is remove the # from the line telnet is on and restart inetd or xinetd by doing inetd restart or xinetd restart.

    : Hi,
    :
    : I want to know how to open the telnet and ftp ports for remote access.
    : Do I need to setup the telnet server? if so, how?
    : Also, how can I check which port is open and which one is closed?
    :
    : I am running redhat 7.0.
    :
    : Thanks
    :
    : gogo
    :


  • gogogogo Posts: 120Member
    Hi,

    I can find xinetd.conf. But, there is no # for remove. There is a xinetd.d dir in which there is a telnet file.

    Is it mean that the telnet was on?

    Thanks

    gogo


    : Its done through /etc/inetd.conf, some distributions use xinetd and I suppose it would be /etc/xinetd/xinetd.conf or /etc/xinetd.conf(not sure), you just have to do is remove the # from the line telnet is on and restart inetd or xinetd by doing inetd restart or xinetd restart.
    :
    : : Hi,
    : :
    : : I want to know how to open the telnet and ftp ports for remote access.
    : : Do I need to setup the telnet server? if so, how?
    : : Also, how can I check which port is open and which one is closed?
    : :
    : : I am running redhat 7.0.
    : :
    : : Thanks
    : :
    : : gogo
    : :
    :
    :


  • gautamgautam Posts: 642Member
    Hmm thats right. I forgot xinetd is different from inetd. I don't use redhat so i end up making such mistakes. Sorry.

    I think redhat has a "Setup" utility to enable telnet. man xinetd.conf and man xinetd should help you a lot.

  • justjjustj Posts: 1Member
    Gogo,

    To add ftp and telnet services you need to install the telnet and ftp
    server daemons. These are in the wu-ftpd and telnet-server RPMs.
    Check to see if you have them installed already with
    rpm -q wu-ftpd
    rpm -q telnet-server

    If they aren't installed get the RPM for RH7.0 and install them (as root) with
    rpm -Uvh wu-ftpd*.rpm telnet-server*.rpm

    Then go into /etc/xinetd.d and look for files named telnet and wu-ftpd.
    Look for a line that has "disable = yes" and change yes to no. It should end up
    looking similar to this:
    service telnet
    {
    disable = no
    flags = REUSE
    socket_type = stream
    wait = no
    user = root
    server = /usr/sbin/in.telnetd
    log_on_failure += USERID
    }

    Save and then restart xinetd with:
    /etc/init.d/xinetd restart

    You should be all set.

    To test if a port is open you can always just telnet to it but I suggest
    familiarizing yourself with nmap. nmap will port scan your box
    and report all open ports on it. nmapfe is a graphical front-end for
    nmap. I use Mandrake and I'm not sure if nmap or nmapfe are installed
    for RedHat by default but you should be able to find RPMs for them
    both.

    /JayB.

    : Hi,
    :
    : I want to know how to open the telnet and ftp ports for remote access.
    : Do I need to setup the telnet server? if so, how?
    : Also, how can I check which port is open and which one is closed?
    :
    : I am running redhat 7.0.
    :
    : Thanks
    :
    : gogo
    :


Sign In or Register to comment.