Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] iptables helper ftp on alternative port not working
View unanswered posts
View posts from last 24 hours

rackathon
 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
c00l.wave
Tux's lil' helper
Tux's lil' helper


Joined: 24 Aug 2003
Posts: 114

PostPosted: Thu Jun 26, 2008 7:25 am    Post subject: [solved] iptables helper ftp on alternative port not working Reply with quote

man iptables says:

Quote:

helper
This module matches packets related to a specific conntrack-helper.

--helper string
Matches packets related to the specified conntrack-helper.

string can be "ftp" for packets related to a ftp-session on default port. For other
ports append -portnr to the value, ie. "ftp-2121".

Same rules apply for other conntrack-helpers.


However, if I setup PureFTPd to a port other than 21 that helper rule doesn't work:

Code:

/sbin/iptables -A INPUT -p tcp --dport 1234 -j ACCEPT
/sbin/iptables -A INPUT -m helper --helper ftp-1234 -j ACCEPT


All other ports (except for other public services) are closed. I get a client connection to the FTP server but on passive mode the connection locks up. It works well with the standard port though. I get no log output nor error message, the rule shows up on iptables -L:

Code:

ACCEPT     all  --  anywhere             anywhere            helper match "ftp-1234"


Is there anything I missed?
_________________
nohup nice -n -20 cp /dev/urandom /dev/null &


Last edited by c00l.wave on Wed Jul 02, 2008 5:34 am; edited 1 time in total
Back to top
View user's profile Send private message
sp7xfq
n00b
n00b


Joined: 28 Dec 2005
Posts: 60
Location: Poland, Kielce

PostPosted: Wed Jul 02, 2008 1:46 am    Post subject: Reply with quote

instead of using the helper module try change ip_conntact_ftp module parameters
Code:

modprobe -r ip_conntrack_ftp
modprobe ip_conntrack_ftp ports=1234

_________________
Andrzej Sobczyk


Feel free to correct my English
Back to top
View user's profile Send private message
c00l.wave
Tux's lil' helper
Tux's lil' helper


Joined: 24 Aug 2003
Posts: 114

PostPosted: Wed Jul 02, 2008 5:34 am    Post subject: Reply with quote

Wow, that did it! :D

Thanks a lot!
_________________
nohup nice -n -20 cp /dev/urandom /dev/null &
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum