View Full Version : how to change ports that used by vsftpd?

5th April 2006, 07:19 PM
the reason i want to do this is because my ISP is blocking port 80, 20, 21 and 25 etc...
i setup a web server that using the port other than 80 and it's working
but i just can't figurate out how to change port for my vsftp server
can anyone give me a little help

ps. by the way, i am using FC5

5th April 2006, 08:35 PM
by the way, i am using FC5

5th April 2006, 08:56 PM
This page might hlep you with this, http://www.vsftpdrocks.org/faq/

5th April 2006, 09:02 PM
thanks for reply

that page only tells me how to change the listening port which i already did
but i also need to change data port from 20 to something else
i am having trouble change the data port
any more idea?

5th April 2006, 09:05 PM
edit the file /etc/vsftpd/vsftpd.conf as root and change/add the following option:
listen_port=(enter port number here)
This will work if you are not using xinetd to accept the incoming connections for vsftpd.
For more info run from terminal:
man vsftpd.conf

5th April 2006, 09:07 PM
to change data port change/add this to /etc/vsftpd/vsftpd.conf

5th April 2006, 10:26 PM
my setting is now:

when i tried to connect to my ftp server
the error log message always tells me something like
can't establish data connection with the server

6th April 2006, 01:40 AM
Things to check:
1. Did you change the ports on your firewall (computer and router)
2. Did you restart the vsftpd service after making the changes

6th April 2006, 02:02 AM
Perhaps your client is requesting passive mode, and your firewall is blocking the port the server hands back. See this thread for some troubleshooting tips. http://forums.fedoraforum.org/forum/showthread.php?t=97374

It would help if you could cut and paste the session output/error messages you see on the client.

Omega Blue
6th April 2006, 03:40 AM
the reason i want to do this is because my ISP is blocking port 80, 20, 21 and 25 etc...

Get a different ISP :D

6th April 2006, 06:46 AM
it's just like what jcliburn said, my client is requesting passive mode and my firewall is blocking those ports
after edit both vsftpd and iptables configuration file, everything works fine now

everyone!! THANK you so much for the help :)