Current time: 04-17-2021, 02:51 AM Hello There, Guest! (LoginRegister)


Post Reply 
[Solved] Changigng Filemanager's FTP port?
Author Message
csacsa62 Offline
Newbie
*

Posts: 5
Joined: May 2010
Reputation: 0
Post: #1
Question [Solved] Changigng Filemanager's FTP port?
Hello!

After installed ispCP and a lot of security modifications, I've changed the default FTP 21 port number to higher one in /etc/proftpd/proftpd.conf. Next changed the default port number to same in "PORT_FTP" field in "config" table of "ispcp" db in MySQL. Everything works fine, all rows green in Server Status page, I can connect and log in to server on high port with FTP(S) clients.
But net2ftp (Filemanager) stuck on port 21, the error message after login attempt:

Unable to connect to FTP server localhost on port 21.

Can't find other info for ftp port in db and in flat config files. Googled a lot, dug in ispCP docs and forum with no success. The problem is not depend to base system and ispCP version (two servers: ispCP 1.0.5 on FreeBSD 8.0 and ispCP 1.0.7 on Debian 6.0.5).

Can someone help me?

Thanks in advance.
|:csa:|
(This post was last modified: 05-26-2012 07:02 PM by csacsa62.)
05-21-2012 03:48 AM
Find all posts by this user Quote this message in a reply
ephigenie Offline
Project Leader
*******
Administrators

Posts: 1,578
Joined: Oct 2006
Reputation: 15
Post: #2
RE: Changigng Filemanager's FTP port?
please take a look in :
/var/www/ispcp/gui/tools/filemanager/settings_authorizations.inc.php

look out for
$net2ftp_settings["allowed_ftpserverport"] = "21"

change it to your desired new port.
05-22-2012 04:46 PM
Visit this user's website Find all posts by this user Quote this message in a reply
csacsa62 Offline
Newbie
*

Posts: 5
Joined: May 2010
Reputation: 0
Post: #3
RE: Changigng Filemanager's FTP port?
Thank you, Ephigenie!

Might I'm partially blind grep'd through filemanager's includes dir but missed the settings* files under my nose. Smile

I needed a quick 'n dirty solution, and put these lines in /etc/rc.local (supposed high ftp port is 12345):

iptables -t nat -I PREROUTING -p tcp --dport 21 -j REDIRECT --to-ports 12345
iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 21 -j REDIRECT --to-ports 12345

It's more secure (for one who is a paranoid like me Smile ) because net2ftp talks with ftp server transparently on localhost port 21 but ftp on all IPs is silently listen on high port.

Cheers,
|:csa:|
05-26-2012 06:56 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)