Advertisement

06.18.2003 at 04:32AM PDT, ID: 20652062
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.4

Passive mode on FTP-server behind IPTables with NAT

Asked by yorthen in Linux Network Security

Tags: , , ,

I have the following setup:
One computer running Slackware 9 with IPTables 1.2.7a protecting a small home network with 4 computers on it. One of these computers (192.168.10.2) is running Windows 2003 and an FTP-server (not IIS) hosting two "sites" one on port 1045 and the other on port 2069. But you can't connect to the FTP-server from the internet using passive mode.

I could open up some ports to allow passive FTP to work but I've heard/read somewhere that iptables could open ports for passive ftp on demand. I've tryed using the ip_conntrack_ftp and it gives me the abillity to use passive FTP from clients in the network to servers on the internet but I still can't use passive FTP from the internet to my server.

Is there anyplace where I can get some more information on using ip_conntrack_ftp and ip_nat_ftp?

My firewallscript:
eth0=internet
eth1=network

   # Load modules
   modprobe ip_conntrack_ftp ports=21,1045,2096
   modprobe ip_nat_ftp ports=21,1045,2069

   # Clear
   iptables -F
   iptables -t nat -F

   # NAT
   echo 1 > /proc/sys/net/ipv4/ip_forward
   iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE # Starta NAT
   iptables -A OUTPUT -o eth0 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT # Allow outgoing connections          <-- Are those lines correct?
   iptables -A INPUT -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT # Allow incomming traffic

   # FTP
   iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 1045 -j DNAT --to 192.168.10.2 # FTP 1
   iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 2069 -j DNAT --to 192.168.10.2 # FTP 2

There are some more but it's just forwarding some ports for a number of programs.Start Free Trial
 
Loading Advertisement...
 
[+][-]06.18.2003 at 09:30AM PDT, ID: 8750578

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.18.2003 at 11:37AM PDT, ID: 8751524

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.18.2003 at 11:48AM PDT, ID: 8751640

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Linux Network Security
Tags: ftp, iptables, passive, mode
Sign Up Now!
Solution Provided By: mburdick
Participating Experts: 1
Solution Grade: B
 
 
 
Loading Advertisement...
20081119-EE-VQP-49