FTP stopped working

Charles Brewster charles-brewster at ntlworld.com
Tue Nov 28 01:45:11 GMT 2006


Hello

I have a LAN with 
	FreeBSD 5.3 PC webserver	(192.168.1.4)
	WinXP development machine 	(192.168.1.2)
	DLink Router/Switch		(192.168.1.1)

For well over a year I have been using SmartFTP v1.5 to move files back and
forth between the FreeBSD server and the WinXP development box. Today
(Monday) SmartFTP wouldn't work and I'm trying to understand why, and fix
it. Running FTP from a DOS prompt also doesn't work today, although I've not
had any problem moving files that way previously.

I can ping back and forth between the machines, also retrieve web pages from
the server over the LAN. Both boxes are able to communicate with the outside
world via the DLink router with no problem.

The only significant event I can think of since the system (including FTP)
was working fine was a brief power outage at the weekend during nearby
thunderstorms. This took down the server (no UPS), and also left the DLink
needing a power-cycle to re-start it. The WinXP box has a meaty Tagan PSU,
and didn't lose power during the outage which lasted barely a second.

When I try to connect (either with SmartFTP or DOS prompt FTP) I get:
"Connected to 192.168.1.4."
then the system seems to hang.
After 20 seconds or so I get
"Connection closed by remote host."

Looking at what is happening on the FreeBSD box:
(ftpd was being started by inetd, but I'm now starting it during bootup from
/etc/rc.local as part of trying to solve this issue.)

At startup
netstat -naf inet
shows the system LISTENing on port 21.

After an FTP connection attempt 
netstat -naf inet
shows the connection ESTABLISHED with the WinXP box correctly identified
using port 21

After about 20 seconds (when the connection times out?)
netstat -naf inet
shows CLOSE_WAIT

Looking back through /var/logs/xferlog 
I can see that the response from the FreeBSD box to an FTP connection
request is usually
FTP LOGIN FROM 192.168.1.2 as [username]
but during efforts today that LOGIN log entry is not being generated.

The username and pw used by SmartFTP are valid - I can use them to login at
the FreeBSD console with no problem. The WinXP machine is included in the
FreeBSD box 'hosts' file with the correct network address.

Can anyone suggest further tests I might try to diagnose and fix this?
Is it straightforward to try to recompile/reinstall ftpd on its own?
I'd prefer to avoid a complete FreeBSD reinstall, as nothing else appears to
be broken.

Many thanks for any helpful suggestions

Charles B


-- 
512k Broadband £14.99 per month
Unlimited Downloads - No extra Costs
£14.99 per month (inc. VAT)
Order Now www.adsl4less.com




More information about the Ukfreebsd mailing list