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 & DNAT

[ILUG] iptables & DNAT

Fergal Moran fergal.moran at wasptech.com
Fri May 25 10:02:30 IST 2001


Ok - I have ditched Smoothwall because it won't do what I want and I am
going with 2.4 and iptables - which is doing masquerading very nicely indeed
at the moment.

What I have so far is this
1 internal NIC used as LAN gateway (eth1)
1 external NIC connected to router (eth0) 

I have assigned a range of public IP addresses to the external NIC and I can
ping these from outside the LAN.  Now I want to forward all http requests
coming in on the external NIC to our webserver on 192.168.1.6 so I issued

[root at pasteur /]# iptables -t nat -A PREROUTING -p tcp --dport 80 -i eth0 -j
DNAT --to 192.168.1.6:80

but nothing - all incoming web requests are still serviced by external NIC
and are not translated to the internal address

oddly an iptables -L produces

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

as if there are no rules defined..

What am I missing folks?

Cheers,

Fergal..
P.S. If I wish to make these rules persistant across reboots - then where is
the best place for them?
--  
WASP Technologies
http://www.wasptech.com
Wireless Application Solutions Provider




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