Changing default FTP service port for MBWE II disable FTP access from outside?

Hello,

I have a Western Digital My Book World Edition II (configured in RAID 1) connected to my Freebox v6 (router from the french ISP “Free”). I want to access FTP server embedded into the NAS from the outside. According to my tests it is not possible to access FTP server from outside IF I change the FTP service default port to something else than 21. Here are the 3 tests I made :

TEST 1

NAS Configuration

IP = 192.168.1.1
FTP Service = Enable
Port = 21 (defined on the NAS management webpage)

Freebox v6\Port Forwarding

IP LAN : 192.168.1.1
Protocol : TCP
Port LAN : 21
Port WAN : 8821

Access from outside (a server under Windows Server 2008 R2) using FileZilla with public_ip_adress:8821

Statut : Connexion à xxx.xxx.xxx.xxx:8821…
Statut : Connexion établie, attente du message d’accueil…
Réponse : 220 vsFTPd 2.0.4+ (ext.3) ready…
Commande : USER admin
Réponse : 331 Please specify the password.
Commande : PASS **********
Réponse : 230 Login successful.
Commande : SYST
Réponse : 215 UNIX Type: L8
Commande : FEAT
Réponse : 211-Features:
Réponse :  EPRT
Réponse :  EPSV
Réponse :  MDTM
Réponse :  PASV
Réponse :  UTF8
Réponse :  REST STREAM
Réponse :  SIZE
Réponse :  TVFS
Réponse : 211 End
Commande : OPTS UTF8 ON
Réponse : 200 UTF8 option is On.
Statut : Connecté
Statut : Récupération du contenu du dossier…
Commande : PWD
Réponse : 257 “/”
Commande : TYPE I
Réponse : 200 Switching to Binary mode.
Commande : PASV
Réponse : 227 Entering Passive Mode (xxx,xxx,xxx,xxx,19,235)
Commande : LIST
Réponse : 150 Here comes the directory listing.
Réponse : 226 Directory send OK.
Statut : Contenu du dossier affiché avec succès

TEST 2

NAS Configuration

IP = 192.168.1.1
FTP Service = Enable
Port = 8821 (defined on the NAS management webpage)

Freebox v6\Port Forwarding

IP LAN : 192.168.1.1
Protocol : TCP
Port LAN : 8821
Port WAN : 8821

Access from outside (a server under Windows Server 2008 R2) using FileZilla with public_ip_adress:8821

Statut : Connexion à xxx.xxx.xxx.xxx:8821…
Statut : Connexion établie, attente du message d’accueil…
Réponse : 220 vsFTPd 2.0.4+ (ext.3) ready…
Commande : USER admin
Réponse : 331 Please specify the password.
Commande : PASS **********
Réponse : 230 Login successful.
Commande : SYST
Réponse : 215 UNIX Type: L8
Commande : FEAT
Réponse : 211-Features:
Réponse :  EPRT
Réponse :  EPSV
Réponse :  MDTM
Réponse :  PASV
Réponse :  UTF8
Réponse :  REST STREAM
Réponse :  SIZE
Réponse :  TVFS
Réponse : 211 End
Commande : OPTS UTF8 ON
Réponse : 200 UTF8 option is On.
Statut : Connecté
Statut : Récupération du contenu du dossier…
Commande : PWD
Réponse : 257 “/”
Commande : TYPE I
Réponse : 200 Switching to Binary mode.
Commande : PASV
Réponse : 227 Entering Passive Mode (192,168,1,1,19,222)
Statut : Le serveur a envoyé une réponse passive avec une adresse non routable. Échec du mode passif.
Commande : PORT 192,168,1,2,245,122
Réponse : 500 Illegal PORT command.
Erreur : Impossible de récupérer le contenu du dossier

TEST 3

NAS Configuration

IP = 192.168.1.1
FTP Service = Enable
Port = 8821 (defined on the NAS management webpage)

Freebox v6\Port Forwarding

IP LAN : 192.168.1.1
Protocol : TCP
Port LAN : 8821
Port WAN : 8821

Freebox v6\Port Forwarding\Range

WAN Ports : 5000-5099
Protocol : TCP
IP Lan : 192.168.1.1

Access from outside (a server under Windows Server 2008 R2) using FileZilla with public_ip_adress:8821

Statut : Connexion à xxx.xxx.xxx.xxx:8821…
Statut : Connexion établie, attente du message d’accueil…
Réponse : 220 vsFTPd 2.0.4+ (ext.3) ready…
Commande : USER admin
Réponse : 331 Please specify the password.
Commande : PASS **********
Réponse : 230 Login successful.
Commande : SYST
Réponse : 215 UNIX Type: L8
Commande : FEAT
Réponse : 211-Features:
Réponse :  EPRT
Réponse :  EPSV
Réponse :  MDTM
Réponse :  PASV
Réponse :  UTF8
Réponse :  REST STREAM
Réponse :  SIZE
Réponse :  TVFS
Réponse : 211 End
Commande : OPTS UTF8 ON
Réponse : 200 UTF8 option is On.
Statut : Connecté
Statut : Récupération du contenu du dossier…
Commande : PWD
Réponse : 257 “/”
Commande : TYPE I
Réponse : 200 Switching to Binary mode.
Commande : PASV
Réponse : 227 Entering Passive Mode (192,168,1,1,19,162)
Statut : Le serveur a envoyé une réponse passive avec une adresse non routable. Échec du mode passif.
Commande : PORT 192,168,1,2,246,149
Réponse : 500 Illegal PORT command.
Erreur : Impossible de récupérer le contenu du dossier

TEST 1 : NAS FTP service is the default one, 21… works like a charm !
TEST 2 : NAS FTP service default port is changed to 8821 and port forwarding follows on my router. No port range forwarding is defined for passive FTP mode. It doesn’t work.
TEST 3 : same test as test 2 adding port-range forwarding for the FTP passive mode. It doesn’t work too.

Is it a bug ? Is the option to change the default FTP service port only supposed to work locally ? Because, if I change the default FTP service port and test with 192.168.1.1:FTP_service_choosen_port… it works. But, if I want to access my FTP from outside and, even if the ports are forwarded properly on my router, it only works if I use 21 for the FTP service port. Did you experience the same issue ? Is there a fix or an explanation to that ?

Thank you for your feedback !

-WaxMax-

Have you tried with another router to make sure it’s not blocked or unassigned to the MBW? What if you use the TELNET command to check the NAT mappings?

make sure to reboot the mbw after changing a port # to 8821. also, try this port scanner to make sure the port shows open through your router: http://www.t1shopper.com/tools/port-scan/