Operating System - HP-UX
1819576 Members
3048 Online
109603 Solutions
New Discussion юеВ

ftp problems--not able to do ftp

 
SOLVED
Go to solution
bhupesh m
Frequent Advisor

ftp problems--not able to do ftp

HI,
B.11.23 U ia64

i have two systems with good configurations in my lab(sand boxes only). The (new)lab admins installed the hpux 11.23(i think something is wrong in that).

now i am not able to do ftp from my windows machine to both of the machines.
this is what happening:
----------------------------------
C:\>ftp ipaddress
Connected to ipaddress.
Connection closed by remote host.
----------------------------------
what is the problem?

from one box to other box:

-----------------------
# ftp 16.***.**.***
Connected to 16.***.**.***.
421 Service not available, remote server has closed connection
ftp> dir
Not connected.
-----------------------

13 REPLIES 13
James R. Ferguson
Acclaimed Contributor
Solution

Re: ftp problems--not able to do ftp

Hi:

Make sure that the 'ftp' service is not commented-out in '/etc/inetd.conf'. You should have a line that looks something like:

ftp stream tcp nowait root /usr/lbin/ftpd ftpd -l

If you need to modify the file, when done, do:

# /usr/sbin/inetd -c

Regards!

...JRF...
HGN
Honored Contributor

Re: ftp problems--not able to do ftp

Hi

Check the /etc/inetd.conf and make sure ftp is enabled, you can run inetd -c to re-read this file after that you can try ftp and it should work.

Rgds

HGN
inventsekar_1
Respected Contributor

Re: ftp problems--not able to do ftp

hi,
ftp service not available. in the msg itself,
--------------
421 Service not available, remote server has closed connection
--------------

refer the files:
/etc/services
/etc/inetd.conf
Be Tomorrow, Today.
bhupesh m
Frequent Advisor

Re: ftp problems--not able to do ftp

hi again,

1.)that line is not commented in /etc/inetd.conf

that lines:
##
ftp stream tcp6 nowait root /usr/lbin/ftpd ftpd -l
telnet stream tcp6 nowait root /usr/lbin/telnetd telnetd

after some 5 lines, tftp line is commented:
#tftp dgram udp wait root /usr/lbin/tftpd tftpd

2.)i ran the command:
inetd -c
and it did nothing. it gave the prompt back without any msg.

thanks
Dave Hutton
Honored Contributor

Re: ftp problems--not able to do ftp

There isn't a firewall between you and the servers correct?

Also if you try to telnet to the port what happens?
servera:root /var/adm/syslog # telnet servera 21
Trying...
Connected to servera.company.com.
Escape character is '^]'.
220 servera.company.com FTP server (Revision 1.1 Version wuftpd-2.6.1(PHNE_34306) Mon Mar 13 11:14:17 GMT 2006) ready.

telnet> close

Does it give a better error message?
James R. Ferguson
Acclaimed Contributor

Re: ftp problems--not able to do ftp

Hi:

Verify that you are not denied access via the '/var/adm/inetd.sec' file. See the manpages fo details:

http://docs.hp.com/en/B2355-60105/inetd.sec.4.html

Regards!

...JRF...
bhupesh m
Frequent Advisor

Re: ftp problems--not able to do ftp

both the servers gives the same output:

# telnet localhost 21
Trying...
telnet: Unable to connect to remote host: Connection refused
#

and from:
#more /var/adm/inetd.sec

ftp is not denied for my windows machine ip(not allowed also..ie no lines about ftp allow or deny).
bhupesh m
Frequent Advisor

Re: ftp problems--not able to do ftp

any ideas?
how to proceed?
Dave Hutton
Honored Contributor

Re: ftp problems--not able to do ftp

Odd, and for sure there is an ftp bin in
ll /usr/lbin/ftpd

For giggles I moved mine out and tried to ftp in. Syslog shows this:
Jul 10 14:02:48 servera inetd[20545]: execv /usr/lbin/ftpd: No such file or directory
Jul 10 14:03:04 servera ftpd[20551]: FTP session closed


servera:root /var/adm/syslog # cat /etc/inetd.conf | grep ftp
ftp stream tcp6 nowait root /usr/lbin/ftpd ftpd -l

There isn't an /etc/ftpd/ftpaccess file there is there? I think some of the features allows or disallows people from longing into ftp at certain times.

Looking back in your syslog.log when you were doing the inetd -c did it say anything other then the standard 3 lines?

Jul 10 14:03:40 servera inetd[957]: Rereading configuration
Jul 10 14:03:40 servera inetd[957]: Thru with configuration
Jul 10 14:03:40 servera inetd[957]: Configuration complete

Bad would or different would be like:
Jul 10 14:06:01 servera inetd[957]: ftp/tcp: New arguments for server sj

Bill Hassell
Honored Contributor

Re: ftp problems--not able to do ftp

Look in syslog to see what your ftp server has logged. It shoulod indicate what the reason is that ftp is not responding. If there are no ftp messages, then the incoming ftp requests are being blocked prior to ftpd. That's where inetd.sec (or IPfilter or other tool) is blocking inside HP-UX. Otherwise, your local router may be blocking ftp. Put a PC on the same subnet as the3 HP-UX system and verify ftp. If it connects, then one or more routers are the problem.


Bill Hassell, sysadmin
Bill Hassell
Honored Contributor

Re: ftp problems--not able to do ftp

Look in syslog to see what your ftp server has logged. It should indicate what the reason is that ftp is not responding. If there are no ftp messages, then the incoming ftp requests are being blocked prior to ftpd. That's where inetd.sec (or IPfilter or other tool) is blocking inside HP-UX. Otherwise, your local router may be blocking ftp. Put a PC on the same subnet as the3 HP-UX system and verify ftp. If it connects, then one or more routers are the problem.


Bill Hassell, sysadmin
bhupesh m
Frequent Advisor

Re: ftp problems--not able to do ftp

---------
Jul 10 18:15:09 IGSRVITN06 inetd[11227]: telnet/tcp: Connection from ::ffff:16.**.**.** at Mon Jul 10 18
:15:09 2006
---------

lot of msg like this(particularly for every two minutes)

and this time:
from one unix machine to other i am able to do ftp. reverse is giving the error still.
------------
ftp 16.1**.1**.1**
Connected to 16.1**.1**.1**
421 Service not available, remote server has closed connection
ftp>
------------

and tail -20 syslog.log
Jul 10 23:36:11 IGSRVITN06 ftpd[11837]: Data port : 20
Jul 10 23:36:44 IGSRVITN06 ftpd[11837]: FTP server (Revision 1.1 Version wuftpd-2.6.1 Tue Jul 15 07:42:07 GMT 2003) ready.
Jul 10 23:36:46 IGSRVITN06 ftpd[11839]: Data port : 20
Jul 10 23:36:56 IGSRVITN06 ftpd[11837]: pam_authenticate:No account present for user
Jul 10 23:36:56 IGSRVITN06 ftpd[11837]: User USER: Login incorrect
Jul 10 23:36:56 IGSRVITN06 ftpd[11837]: failed login from ::ffff:16.1**.1**.1** [::ffff:16.1**.1**.1**]
Jul 10 23:38:23 IGSRVITN06 ftpd[11839]: lost connection to ::ffff:16.1**.1**.1** [::ffff:16.1**.1**.1** ]
Jul 10 23:38:23 IGSRVITN06 ftpd[11839]: FTP session closed
Jul 10 23:52:01 IGSRVITN06 ftpd[11837]: User unknown timed out after 900 seconds at Mon Jul 10 23:52:01 2006
Jul 10 23:52:01 IGSRVITN06 ftpd[11837]: FTP session closed
Jul 10 23:56:06 IGSRVITN06 inetd[752]: Rereading configuration
Jul 10 23:56:06 IGSRVITN06 inetd[752]: Configuration complete
Jul 11 00:19:17 IGSRVITN06 inetd[752]: Rereading configuration
Jul 11 00:19:17 IGSRVITN06 inetd[752]: Configuration complete
Jul 11 01:07:22 IGSRVITN06 ftpd[12017]: Data port : 20
Jul 11 01:07:55 IGSRVITN06 ftpd[12017]: FTP server (Revision 1.1 Version wuftpd-2.6.1 Tue Jul 15 07:42:07 GMT 2003) ready.
Jul 11 01:08:11 IGSRVITN06 ftpd[12017]: FTP LOGIN FROM ::ffff:16.1**.1**.1** [::ffff:16.1**.1**.1** ], user2
Jul 11 01:08:44 IGSRVITN06 ftpd[12022]: Data port : 20
Jul 11 01:10:21 IGSRVITN06 ftpd[12022]: lost connection to ::ffff:16.1**.1**.1** [::ffff:16.1**.1**.1** ]
Jul 11 01:10:21 IGSRVITN06 ftpd[12022]: FTP session closed

#

and those two unix itanium 11.23machines are in a lab which may have firewalls or some security settings...
1.)how to check whether its behind firewals or not?
2.)now,from unix machine1 to other(2) ftp is happening fine. the above syslog is from machine1.
3.) from my windows machine,
not able to do ftp still.
error:
C:\>ftp 16.1**.1**.1**
Connected to 1**.1**.1**.
Connection closed by remote host.
c:\>
Dave Hutton
Honored Contributor

Re: ftp problems--not able to do ftp

Sure seems like a firewall. The only way to know is ask someone in your network group that I know of.

Portscanning won't show too much since you can't even telnet to 21.

Being you can ftp from another server to it. And it looks like ftps are going through, just not from your machine it seems like its isolated to a networking issue.

I'm not real familiar with IPFilters but maybe someone else can touch on if somehow that may of been installed and turned on?

I have an IA 11.23 server and didn't have to do anything special to get ftp working. I think that was using the March 06 media.