Issue Reported:
We’re able to ftp from Source server “labserver1” to destination server “labserver3” with this user id “devbatch”.
But, after connecting the FTP server “labserver3” we are not able to run any command.
We are getting error that “501 IP Address for data destination doesn’t match client’s”.
Error Messsage:
501 IP Address for data destination doesn’t match client’s
Action Taken:
We are able to connect FTP and commands are running successfully in ‘passive mode’.
But we need to run the script in ‘active mode’, Here this the below updated exact issue we are facing.
Could you please suggest on it.
Source: labserver1
Destination: labserver3
labserver1:/root # ftp labserver3
Connected to labserver3.xyz.com.
220 labserver3 FTP server (Version 4.2 Mon Jan 2 11:23:18 IST 2014) ready.
Name (labserver3:root): batch5
331 Password required for batch5.
Password:
230-Last unsuccessful login: Tue Feb 9 03:24:53 IST 2016 on ftp from
230-Last login: Wed Feb 5 08:37:58 IST 2016 on ftp
230 User batch5 logged in.
ftp> ls
501 IP Address for data destination doesn’t match client’s.
425 No data connection
ftp>
Solution:
Add two ‘ff’ at the end of ftp entry. If already one ‘f’ exist then add only one at the end.
1) Modified /etc/inetd.conf on server labserver3 (Destination) as below
ftp stream tcp6 nowait root /usr/sbin/ftpd ftpd -u 022 -ff
2) Restart or refresh inetd service
refresh -s inetd