Computing.Net > Forums > Linux > How to setup iptable for active FTP

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

How to setup iptable for active FTP

Reply to Message Icon

Name: katsu
Date: November 24, 2002 at 23:48:45 Pacific
OS: Redhat 7.2J
CPU/Ram: Pentium
Comment:

We use a Linux server to act as router for local network accessing
Internet and it's necessary to let local machine access ftp server
on the Internet. How to setup iptables when using active ftp connection
(that's PORT mode not PASV mode).
Thanks in advance.

The iptable is as following.
*nat
:PREROUTING ACCEPT [19679:1112350]
:POSTROUTING ACCEPT [47:2939]
:OUTPUT ACCEPT [549:33489]
-A POSTROUTING -o ppp0 -j MASQUERADE
-A POSTROUTING -s 192.168.1.0/255.255.255.0 -o ppp0 -j MASQUERADE
COMMIT
# Completed on Mon Nov 25 16:20:25 2002
# Generated by iptables-save v1.2.3 on Mon Nov 25 16:20:25 2002
*filter
:INPUT ACCEPT [24909:3228138]
:FORWARD ACCEPT [806467:523158528]
:OUTPUT ACCEPT [22048:8745798]
-A INPUT -p tcp -m tcp --dport 21 -m state --state NEW,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 20 -m state --state ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --sport 21 -m state --state ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --sport 20 -m state --state RELATED,ESTABLISHED -j ACCEPT
COMMIT



Sponsored Link
Ads by Google

Response Number 1
Name: Levi
Date: November 26, 2002 at 19:18:05 Pacific
Reply:

I don't know, but check out

http://www.linuxnewbie.org/nhf/


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Linux Forum Home


Sponsored links

Ads by Google


Results for: How to setup iptable for active FTP

how to setup adsl for linux www.computing.net/answers/linux/how-to-setup-adsl-for-linux/9997.html

how to setup a iptables, squid..... www.computing.net/answers/linux/how-to-setup-a-iptables-squid/28328.html

Doc to setup iptables www.computing.net/answers/linux/doc-to-setup-iptables/23690.html