OpenVZ Forum


Home » General » Support » *SOLVED* Firewall rule don't allow ftp while port 21 is open
Re: Firewall rule don't allow ftp while port 21 is open [message #7186 is a reply to message #7181] Fri, 06 October 2006 09:47 Go to previous messageGo to previous message
whatever is currently offline  whatever
Messages: 142
Registered: September 2006
Senior Member
Do we have to enable the passive mode in the pureftpd config file too?
The firewall rules drop anything above 1024. In pureftpd config file # PassivePortRange 30000 50000
How do I enable this in firewall rules for port 20-21 as anything above 1024 is dropped

This rule is correct?

for OURIP in ${SERVER_IPS}; do
for PORT in 20 21; do
${FWIN} -p tcp -d ${OURIP} --dport ${PORT} ${OK}
${FWIN} -p tcp --sport ${PORT} -d ${OURIP} --dport 30000:40000 "!" --syn ${OK}
${FWIN} -p udp -d ${OURIP} --dport ${PORT} ${OK}
${FWIN} -p udp --sport ${PORT} -d ${OURIP} --dport 30000:40000 ${OK}
done
done

Thanks
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: *SOLVED* Broken VPS problem
Next Topic: Packet loss problem
Goto Forum:
  


Current Time: Tue Jul 15 19:37:42 GMT 2025

Total time taken to generate the page: 0.06088 seconds