ftp server over internet using different port

2

I want to access my ftp server over the internet. I run it on Debian, I changed the port to 201, and my local ip is 192.168.1.3.

I can access it from any computer on my network through ftp://192.168.1.3:201. I see the login page, I login with my linux user account and can see my files.

To make it public, I setup a port mapping on my router for port 201. However now, when I try ftp://mypublicip:201, it shows me the login page, but when I enter the login, it keeps loading forever without showing my files.

Strangely, when I run it over the default port (21), it works fine.

Can anyone tell me what is the problem here?

امير طارق

Posted 2012-10-03T09:37:03.393

Reputation: 21

Answers

0

First off, don't use ftp. It is insecure and really crappy (who needs 30 ports to transfer a file?) The problem you're seeing is most likely due to the fact that ftp uses multiple ports. One for the connection, a second (or third, fourth, etc) for data transfers. This includes transfers of file lists.

The other possibility is that the browser is dropping the port reference. Internet Explorer has a really bad habit of this. Once you log in, many times it renames the URL from ftp://user:pass@host to just ftp://host and then since the URL doesn't specify a name or pass any longer, attempts to log you in anonymously. The same could be happening with the port, but I don't know about the browser you're using and if that's a possibility.

My suggestion is to NOT USE FTP first off. Use ssh. It's encrypted. FTP is sending your password over the public internet in plain text, just FYI. I recommend the below URL for other reasons.

http://mywiki.wooledge.org/FtpMustDie

UtahJarhead

Posted 2012-10-03T09:37:03.393

Reputation: 1 755

i solved it i map port range 8000 to 8010 from my router and then configure the ftp server to use these passive range for data transfer, I will search about ssh i do not know any thing about it thank you – امير طارق – 2012-10-04T09:07:54.707