LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-17-2003, 12:51 PM   #1
kasnol
LQ Newbie
 
Registered: Jun 2003
Location: Hong Kong
Posts: 3

Rep: Reputation: 0
Ftp service on non-standard ports


Hi~ Does anyone know how to set up ftp service on a non-standard ftp port [i.e. 9021] ?

I have tried changing the server port setting in proftpd / pureftpd under Mandrake 9.1 however not working.
(I have open the port 9021 from shorewall )

I have read bits and pieces of infomration you needed to add tcp/udp entries at /etc/service:


ftp-A 9021/tcp
ftp-A 9021/udp fsp fspd

What else are there to be done ?

Thanks a LOT & in Advance !!!
 
Old 06-17-2003, 01:09 PM   #2
zmedico
Member
 
Registered: Feb 2002
Location: Mission Viejo, California, USA
Distribution: Gentoo
Posts: 707

Rep: Reputation: 30
Re: Ftp service on non-standard ports

Quote:
Originally posted by kasnol

I have tried changing the server port setting in proftpd / pureftpd under Mandrake 9.1 however not working.
Are they still listening on the wrong ports or what? You can use "netstat -tanp" so see what is listening on what port.

Last edited by zmedico; 06-17-2003 at 01:11 PM.
 
Old 06-18-2003, 01:49 PM   #3
kasnol
LQ Newbie
 
Registered: Jun 2003
Location: Hong Kong
Posts: 3

Original Poster
Rep: Reputation: 0
maybe related to shorewall

I suspect it might be due to shorewall settings - apparently it gives me the following message when I ftp from another box:

200 Type set to A.
200 PORT command successful
425 Unable to build data connection: Connection refused.

or could it be the it can't recognize it need to open local ports for transfers ?
 
Old 06-18-2003, 05:24 PM   #4
zmedico
Member
 
Registered: Feb 2002
Location: Mission Viejo, California, USA
Distribution: Gentoo
Posts: 707

Rep: Reputation: 30
I haven't used shorewall but for iptables I had to do "/sbin/modprobe ip_conntrack_ftp" to make my firewall allow ftp related data connections.

It's also possible that the client isn't allowing the data connection to come in. Passive mode is a workaround in that case.

Last edited by zmedico; 06-18-2003 at 05:28 PM.
 
Old 06-19-2003, 12:44 PM   #5
kasnol
LQ Newbie
 
Registered: Jun 2003
Location: Hong Kong
Posts: 3

Original Poster
Rep: Reputation: 0
I did add this lines to /etc/modules/conf:


options ip_nat_ftp ports=3D21,9021
options ip_conntrack_ftp ports=3D21,9021

however still the problem exists ... any ideas ?
 
Old 06-19-2003, 10:48 PM   #6
zmedico
Member
 
Registered: Feb 2002
Location: Mission Viejo, California, USA
Distribution: Gentoo
Posts: 707

Rep: Reputation: 30
Are you sure those modules are really inserted? You can read /proc/modules to make sure they are.

Are you using passive mode on the client?

Can you set up your firewall to log all the dropped packets in /var/log/messages? That's what I do with iptables, so I can use the log for debugging.

Last edited by zmedico; 06-19-2003 at 11:06 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Standard FTP client. unreal128 Linux - General 2 09-13-2005 12:31 AM
wiki on standard (ftp upload) web site ? dtimms Programming 2 01-11-2005 04:28 AM
SuSE 9.2 - FTP Port open with no FTP service?!?! don_wombat Linux - Security 12 12-01-2004 03:14 PM
Can I Modify The Telnet Server To Listen To Non-Standard Ports? windisch Linux - Security 7 11-16-2004 02:47 PM
ipchains, ftp from client to non-ftp ports atari303 Linux - Networking 2 11-08-2002 02:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration