LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] iptables and FTP

[ILUG] iptables and FTP

Reilly, John John at xelector.com
Fri Mar 8 15:34:25 GMT 2002


> > 
> > The first two deal with port 21, then the following two 
> deal with the
> > ftp-data port.  Next two lines to do passive ftp.
> > The above is the format understood  by iptables-restore
> 
> I entered these rules after the SuSE script had run and 
> although I could
> then ftp from the server, so the firewalling part seems 
> correct, I still
> couldn't FTP from a masqueraded client. We often talk about
> lectures/discussions etc. - I would certainly find an iptables
> workshop/lecture Q&A very worthwhile - any volunteers ?

Within iptables there are two different way to do nat.  You can use the SNAT
target or the MASQUERADE target.  I use the SNAT target.

e.g. 
# NAT for hosts behind the firewall
-A POSTROUTING -o eth0 -s 192.168.80.0/24 -j SNAT --to-source 194.xx.xx.xx

Where 194.xx.xx.xx is the external address that the real world sees and
192.168.80.0/24 is the internal network and eth0 is the external interface.
This is in the nat table.

Cheers,
jr






More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell