I have one RB 433 AP that i would like to backup using automated windows cli ftp client. I can log in to the AP’s FTP server but some weird things happened. I can execute commands like pwd, cd, but this AP won’t let me list any file as well as upload/download.
ftp> o 10.2.0.27 21
Connected to 10.2.0.27.
220 AP 10 FTP server (MikroTik 5.6) ready
User (10.2.0.27:(none)): backup
331 Password required for backup
Password:
230 User backup logged in
ftp> pwd
257 "/" is current directory
ftp> cd skins
250 CWD command successful
ftp> ls
425 Can't build data connection
ftp> cd /
250 CWD command successful
ftp> ls
425 Can't build data connection
ftp> lcd c:\temp
Local directory now C:\temp.
ftp> put somescript.rsc
425 Can't open data connection
ftp>
FTP service and service port is active.
[admin@AP 10] > ip firewall service pr
Flags: X - disabled, I - invalid
# NAME PORT
0 I ftp 21
1 X tftp 69
2 X irc 6667
3 X h323
4 X sip 5060
5061
5 X pptp
[admin@AP 10] > ip service pr
Flags: X - disabled, I - invalid
# NAME PORT ADDRESS CERTIFICATE
0 telnet 23
1 ftp 21 10.0.0.0/8
2 X www 80
3 X ssh 22
4 X www-ssl 443 none
5 X api 8728
6 winbox 8291
That’s what it looks like. I can download/upload using filezilla ftp client but not windows ftp.exe. Note that i accessed this AP from my internal network and no firewall/NAT exists between my PC and this AP.
Can anyone enlighten me? Any help would be appreciated. Thanks.
Thanks for replying jan, however switching to passive mode doesn’t solve the problem.
ftp> o 10.254.0.2
Connected to 10.254.0.2.
220 AP 10 FTP server (MikroTik 5.6) ready
User (10.254.0.2:(none)): backup
331 Password required for backup
Password:
230 User backup logged in
ftp> quote pasv
227 Entering Passive Mode (10,254,0,2,236,203).
ftp> ls
425 Can't build data connection
ftp> dir
425 Can't build data connection
ftp> cd skins
250 CWD command successful
ftp> ls
425 Can't build data connection
ftp> bin
200 Type set to I
ftp> ls
425 Can't build data connection
The fact remains, error 425 is a pasv/active issue, and is a problem with your FTP client, not with the Mikrotik. Perhaps you should search for a different ftp client that works properly.
I tried to switch some ftp clients and somehow ftp.exe issue solved with that AP. However, i found out that another AP of mine also have the same behavior that won’t be solved with the same approach.
Do you have any suggestion which ftp client that can easily scripted for automatic backup job?