Forum Moderators: phranque

Message Too Old, No Replies

iptables help

         

httpwebwitch

4:19 pm on Apr 29, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



When I have iptables on, I can't connect to my server via FTP.
When I turn iptables off, I can.

It's something to do with the ports used for PASV (passive) connections, which I have defined in the FTP server conf as the range 50000-51000

I've already added this line to my iptables:

-A INPUT -m state --state NEW -m tcp -p tcp --sport 50000:51000 -j ACCEPT


That same syntax worked fine for opening port 80 for http, others for mysql, postmap, and dovecot for IMAP/POP etc.

The syntax & options for iptables is mysterious to me. I just picked up a manual which I'll read over the weekend, but meanwhile can someone tell me what I've done wrong?

httpwebwitch

2:35 am on Apr 30, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



aha. it should be --dport, not --sport.

that's all it was.
all working now.

ciol

12:47 pm on May 2, 2011 (gmt 0)

10+ Year Member



simple solution and you were so tensed.

httpwebwitch

1:27 pm on May 2, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I know! I was all clenched up! Firewall problems do that to me.