Networking
cancel
Showing results for 
Search instead for 
Did you mean: 

HP-UX 11.31 FTP and telnet closed connection

OBSUV0091126257
Occasional Contributor

HP-UX 11.31 FTP and telnet closed connection

Hello All

I have installed  ProFTPD 1.3.5b on the HP-UX 11.31 Itanium x64 but encounter following error when trying to connect to ProFTPD

 # ftp localhost 2122
Connected to localhost.
421 Service not available, remote server has closed connection
ftp>
 

 

The network connection is properly established (Connected to localhost.),

# telnet localhost
Trying...
Connected to localhost.
Escape character is '^]'.
Local flow control on
Telnet TERMINAL-SPEED option ON

HP-UX cssapv06 B.11.31 U ia64 (ta)

login: 

The problem seems for telnet connection on port 2122.

# telnet 10.6.73.142 2122
Trying...
Connected to 10.6.73.142.
Escape character is '^]'.
Connection closed by foreign host.
#

We have particularly checked following files:

  • /etc/inetd.conf
  • /etc/services

# more /etc/services|grep -iE "ftp|telnet"
ftp-data 20/tcp # File Transfer Protocol (Data)
ftp 21/tcp # File Transfer Protocol (Control)
#ftp 2122/tcp #Custom File Transfer Protocol (Control
telnet 23/tcp # Virtual Terminal Protocol
tftp 69/udp # Trivial File Transfer Protocol
sftp 115/tcp # Simple File Transfer Protocol
bftp 152/tcp # Background File Transfer Protocol
proftpd 2122/tcp # Serveur proftpd
ftp-ftam 8868/tcp # FTP->FTAM Gateway
#

# more /etc/inetd.conf|grep -v "#"|grep -iE "telnet|ftp"
telnet stream tcp6 nowait root /usr/lbin/telnetd telnetd
tftp dgram udp wait root /usr/lbin/tftpd tftpd\
#

 

# netstat -an|grep -iE "LISTEN"
tcp 0 0 *.10710 *.* LISTEN
tcp 0 0 127.0.0.1.50559 *.* LISTEN
tcp 0 0 *.40001 *.* LISTEN
tcp 0 0 *.199 *.* LISTEN
tcp 0 0 *.2121 *.* LISTEN
tcp 0 0 127.0.0.1.49167 *.* LISTEN
tcp 0 0 127.0.0.1.49610 *.* LISTEN
tcp 0 0 *.50813 *.* LISTEN
tcp 0 0 *.50213 *.* LISTEN
tcp 0 0 *.3600 *.* LISTEN
tcp 0 0 *.13782 *.* LISTEN
tcp 0 0 *.50013 *.* LISTEN
tcp 0 0 *.49251 *.* LISTEN
tcp 0 0 *.49246 *.* LISTEN
tcp 0 0 *.3200 *.* LISTEN
tcp 0 0 *.40000 *.* LISTEN
tcp 0 0 127.0.0.1.65000 *.* LISTEN
tcp 0 0 127.0.0.1.49319 *.* LISTEN
tcp 0 0 127.0.0.1.49299 *.* LISTEN
tcp 0 0 127.0.0.1.1557 *.* LISTEN
tcp 0 0 *.10750 *.* LISTEN
tcp 0 0 *.5634 *.* LISTEN
tcp 0 0 *.2049 *.* LISTEN
tcp 0 0 *.1508 *.* LISTEN
tcp 0 0 *.10700 *.* LISTEN
tcp 0 0 127.0.0.1.49244 *.* LISTEN
tcp 0 0 *.515 *.* LISTEN
tcp 0 0 *.3181 *.* LISTEN
tcp 0 0 *.44308 *.* LISTEN
tcp 0 0 *.1128 *.* LISTEN
tcp 0 0 *.50014 *.* LISTEN
tcp 0 0 *.135 *.* LISTEN
tcp 0 0 127.0.0.1.7161 *.* LISTEN
tcp 0 0 *.10705 *.* LISTEN
tcp 0 0 *.13724 *.* LISTEN
tcp 0 0 127.0.0.1.49161 *.* LISTEN
tcp 0 0 *.4800 *.* LISTEN
tcp 0 0 *.3202 *.* LISTEN
tcp 0 0 *.50214 *.* LISTEN
tcp 0 0 127.0.0.1.10864 *.* LISTEN
tcp 0 0 *.8000 *.* LISTEN
tcp 0 0 127.0.0.1.49305 *.* LISTEN
tcp 0 0 *.8008 *.* LISTEN
tcp 0 0 *.111 *.* LISTEN
tcp 0 0 *.4045 *.* LISTEN
tcp 0 0 127.0.0.1.64999 *.* LISTEN
tcp 0 0 *.7815 *.* LISTEN
tcp 0 0 *.22 *.* LISTEN
tcp 0 0 *.901 *.* LISTEN
tcp 0 0 10.67.0.25.3233 *.* LISTEN
tcp 0 0 *.4750 *.* LISTEN
tcp 0 0 *.1556 *.* LISTEN
tcp 0 0 *.49537 *.* LISTEN
tcp 0 0 *.40080 *.* LISTEN
tcp 0 0 *.49153 *.* LISTEN
tcp 0 0 *.49152 *.* LISTEN
tcp 0 0 *.49154 *.* LISTEN
tcp 0 0 *.49200 *.* LISTEN
tcp 0 0 *.13900 *.* LISTEN
tcp 0 0 *.8102 *.* LISTEN
tcp 0 0 127.0.0.1.49164 *.* LISTEN
tcp 0 0 *.49536 *.* LISTEN
tcp 0 0 127.0.0.1.32000 *.* LISTEN
tcp 0 0 *.40002 *.* LISTEN
tcp 0 0 *.587 *.* LISTEN
tcp 0 0 127.0.0.1.49259 *.* LISTEN
tcp 0 0 *.25 *.* LISTEN
tcp 0 0 127.0.0.1.49165 *.* LISTEN
tcp 0 0 127.0.0.1.49163 *.* LISTEN
tcp 0 0 127.0.0.1.49162 *.* LISTEN
tcp 0 0 *.3300 *.* LISTEN
tcp 0 0 *.3181 *.* LISTEN
tcp 0 0 *.514 *.* LISTEN
tcp 0 0 *.513 *.* LISTEN
tcp 0 0 *.512 *.* LISTEN
tcp 0 0 *.23 *.* LISTEN
tcp 0 0 *.5634 *.* LISTEN
tcp 0 0 *.9 *.* LISTEN
tcp 0 0 *.7 *.* LISTEN
tcp 0 0 *.37 *.* LISTEN
tcp 0 0 *.13 *.* LISTEN
tcp 0 0 *.113 *.* LISTEN
tcp 0 0 *.49249 *.* LISTEN
tcp 0 0 *.543 *.* LISTEN
tcp 0 0 *.544 *.* LISTEN
tcp 0 0 *.19 *.* LISTEN
tcp 0 0 *.5989 *.* LISTEN
tcp 0 0 *.1712 *.* LISTEN
tcp 0 0 *.2122 *.* LISTEN
tcp 0 0 *.22 *.* LISTEN
tcp 0 0 *.2301 *.* LISTEN
tcp 0 0 *.1556 *.* LISTEN
tcp 0 0 *.1527 *.* LISTEN
#

Do you have any elements about this type of problem and any working path on HP-UX configuration ?

 

4 REPLIES
Torsten.
Acclaimed Contributor

Re: HP-UX 11.31 FTP and telnet closed connection

it does not work that way.
you need to adjust inetd.conf
but why not disable telnet and ftp and use something more secure?

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
OBSUV0091126257
Occasional Contributor

Re: HP-UX 11.31 FTP and telnet closed connection

Hello Torsten

 

I understand your suggestion.But customer wants only proftpd.Thus could you please help me in solving this issue?

 

Thanks

Torsten.
Acclaimed Contributor

Re: HP-UX 11.31 FTP and telnet closed connection

I don't see any sense in this.

Why you want to do this?

 

However, have a look at

https://community.hpe.com/t5/System-Administration/how-to-change-ftp-port/td-p/3665815


Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
Steven Schweda
Honored Contributor

Re: HP-UX 11.31 FTP and telnet closed connection

   I know nothing about ProFTPD, but ...

> I have installed ProFTPD 1.3.5b [...]

   That tells me very little about how you configured it.

> proftpd 2122/tcp # Serveur proftpd

   How do we know that ProFTPD uses this?  My quick look at the ProFTPD
FAQ found:

      http://www.proftpd.org/docs/faq/linked/faq-ch4.html

"11. Can I run an FTP server on a non-standard port?", but it referred
to directives in the ProFTPD configuration file ("/etc/proftpd.conf" or
"/usr/local/etc/proftpd.conf", I gather), not this.

   FTP (active mode) normally uses two ports, 20 (ftp-data) and 21
(ftp).  If you do specify port 2122, will ProFTPD also want to use port
2121?  I don't know what it is, but around here, someone seems to be
listening on that port, and I'm not doing anything special with FTP (or
ports 2121 or 2122):

dyi# netstat -an | grep '\.2'
[...]
tcp 0 0 *.2121 *.* LISTEN
tcp 0 0 *.22 *.* LISTEN
tcp 0 0 *.23 *.* LISTEN
tcp 0 0 *.21 *.* LISTEN
tcp 0 0 *.22 *.* LISTEN
udp 0 0 *.2121 *.*
[...]

   Knowing nothing, before I tried to get ProFTPD (or any FTP server) to
use port X, I'd want to make sure that both ports X-1 and X are not
being used.  Then, I'd find some ProFTPD documentation which explains
how to specify the port (or ports) which it uses.  Then, if I had
trouble, I'd probably look for help on a ProFTPD forum, but, if I wanted
to ask about it here, then I'd provide links to the ProFTPD
documentation on which I was relying.

> # telnet 10.6.73.142 2122
> Trying...
> Connected to 10.6.73.142.

> # more /etc/inetd.conf|grep -v "#"|grep -iE "telnet|ftp"
> telnet stream tcp6 nowait root /usr/lbin/telnetd telnetd
> tftp dgram udp wait root /usr/lbin/tftpd tftpd\
> #

   If you're not using inetd to run ProFTPD, how are you starting it?
Is it running?  Are you talking to it or to some other program?


> [...] But customer wants only proftpd. [...]

   Is there some reason?  Is there some reason why you want to run both
ProFTPD (on strange ports) and your normal, old FTP server (on the
normal FTP ports) on the same system?