LxCenter HyperVM & Kloxo Support

Forum



Members   Search      Help    Register    Login    Home
Home » LxCenter » Contributed HOWTOs » change FTP port on Kloxo(if you want to change the Kloxo ftp from standard port 21 to any other port this is how you do it ~)
change FTP port on Kloxo [message #85640] Wed, 22 June 2011 06:09 Go to next message
petralian is currently offline petralian  China
Messages: 59
Registered: February 2011
Location: Hong Kong
Valuable Member

1. # nano -w /etc/xinetd.d/pureftp

2. change "service ftp" to "service pureftp"
save and close...

3. # nano -w /etc/services

4. search for
ftp             21/tcp
ftp             21/udp          fsp fspd


and add this below it
pureftp         12345/tcp
pureftp         12345/udp               fsp fspd

(you can change the number 12345 to any port number of your liking)
save and close...

5. # service xinetd restart

6. check your ports (# netstat -an | grep -i listen)
and look for the entry
tcp     0    0 0.0.0.0:12345      0.0.0.0:*     LISTEN

if you see this, your ftp server no longer listens to port 21 but to port 12345 instead!

7. update your firewall to allow those ports if you used the [[ How+to+secure+your+Kloxo+with+IPTABLES|http://wiki.lxcenter. org/How+to+secure+your+Kloxo+with+IPTABLES]] tutorial!

change:
# FTP Out
iptables -t filter -A OUTPUT -p tcp --dport 20:21 -j ACCEPT
iptables -t filter -A OUTPUT -p tcp --dport 30000:50000 -j ACCEPT
# FTP In
iptables -t filter -A INPUT -p tcp --dport 20:21 -j ACCEPT
iptables -t filter -A INPUT -p tcp --dport 30000:50000 -j ACCEPT
iptables -t filter -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
echo - FTP : [OK]


to:
# FTP Out
iptables -t filter -A OUTPUT -p tcp --dport 12345 -j ACCEPT
iptables -t filter -A OUTPUT -p tcp --dport 30000:50000 -j ACCEPT
# FTP In
iptables -t filter -A INPUT -p tcp --dport 12345 -j ACCEPT
iptables -t filter -A INPUT -p tcp --dport 30000:50000 -j ACCEPT
iptables -t filter -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
echo - FTP : [OK]


8. # service firewall stop (because there is no restart command)

9. # service firewall start

10. check out http:// forum.lxcenter.org/index.php?t=msg&th=15938&goto=848 43&#msg_84843 if you want a more secure connection (TLS) also (thanks Semir!)

[Updated on: Wed, 22 June 2011 06:18]

Report message to a moderator

Re: change FTP port on Kloxo [message #86473 is a reply to message #85640] Fri, 08 July 2011 02:04 Go to previous message
mahdideveloper is currently offline mahdideveloper  Iran, Islamic Republic of
Messages: 19
Registered: July 2011
Location: iran
Member
I'm run pure-ftp but so
Sometime I get even 15 messages per hour and my mailbox get full of kloxo messages.
/etc/init.d/xinetd restart

for what I have received it ....
Previous Topic:Self Billing
Next Topic:Import plesk into kloxo
Goto Forum:
  


Current Time: Sat May 25 16:58:36 EDT 2013

Total time taken to generate the page: 0.01075 seconds
.:: Contact :: Home :: Privacy ::.

Click here to lend your support to: LxCenter and make a donation at www.pledgie.com !

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software