From mboxrd@z Thu Jan 1 00:00:00 1970 From: "George Vieira" Subject: RE: SMTP HTTP port allow Date: Wed, 27 Aug 2003 20:40:20 +1000 Sender: netfilter-admin@lists.netfilter.org Message-ID: References: <20030827065256.47173.qmail@web20708.mail.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0010_01C36CDB.6ED4BFE0" Return-path: In-Reply-To: <20030827065256.47173.qmail@web20708.mail.yahoo.com> Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: To: ads nat , netfilter@lists.netfilter.org This is a multi-part message in MIME format. ------=_NextPart_000_0010_01C36CDB.6ED4BFE0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit You have not used MASQUERADE in your POSTROUTING rules or haven't showed it.. iptables -A POSTROUTING -t nat -p tcp -s 192.168.0.42 -d 207.106.22.35 --dport 80 -j MASQUERADE iptables -A POSTROUTING -t nat -p tcp -s 192.168.0.23 -d 207.106.22.35 --dport 80 -j MASQUERADE without the rules above, the 192.168.0.XX packets leave the network out into the internet and eventually get dropped by some ISP... -----Original Message----- From: netfilter-admin@lists.netfilter.org [mailto:netfilter-admin@lists.netfilter.org]On Behalf Of ads nat Sent: Wednesday, August 27, 2003 4:53 PM To: netfilter@lists.netfilter.org Subject: SMTP HTTP port allow I am implimenting iptables for first time. I want to allow all my LAN users to send emails to SMTP (port no. 25) all destination with following code. : *** iptables -A FORWARD -p tcp --dport 25 -j ACCEPT *** I also want to allow LAN users having ip 192.168.0.42 192.168.0.23 to upload contents to webserver on ip 207.106.22.35 (outside of LAN) with following code. *** iptables -A FORWARD -p tcp -s 192.168.0.42 192.168.0.23 -d 207.106.22.35 --dport 80 -j ACCEPT *** I would loke know whether It works or not. Tell me whether my code is O.K. also where can i check logs. Thanks ---------------------------------------------------------------------------- ---- Do you Yahoo!? Yahoo! SiteBuilder - Free, easy-to-use web site design software ------=_NextPart_000_0010_01C36CDB.6ED4BFE0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
You=20 have not used MASQUERADE in your POSTROUTING rules or haven't showed=20 it..
 
iptables -A POSTROUTING -t = nat=20 -p tcp -s 192.168.0.42 -d = 207.106.22.35=20 --dport 80 -j MASQUERADE
iptables -A POSTROUTING -t nat -p tcp -s = 192.168.0.23 -d 207.106.22.35 --dport 80 -j=20 MASQUERADE
 
 
without the rules above, the 192.168.0.XX packets leave the = network out=20 into the internet and eventually get dropped by some = ISP...
 
-----Original Message-----
From:=20 netfilter-admin@lists.netfilter.org=20 [mailto:netfilter-admin@lists.netfilter.org]On Behalf Of ads=20 nat
Sent: Wednesday, August 27, 2003 4:53 PM
To:=20 netfilter@lists.netfilter.org
Subject: SMTP HTTP port=20 allow

I am implimenting iptables for first time.
I want to allow all my LAN users to send emails to SMTP (port no.=20 25) all destination with following code. :
 
***
iptables -A FORWARD -p tcp --dport 25 -j ACCEPT
***
 
I also want to allow LAN users having ip 192.168.0.42 192.168.0.23 = to=20 upload contents to webserver on ip 207.106.22.35 (outside of = LAN) with=20 following code.
 
***
iptables -A FORWARD -p tcp -s 192.168.0.42 192.168.0.23 -d = 207.106.22.35=20 --dport 80 -j ACCEPT
***
 
I would loke know whether It works or not.
Tell me whether my code is O.K. also where can i check logs.
Thanks


Do you Yahoo!?
Yahoo!=20 SiteBuilder - Free, easy-to-use web site design = software ------=_NextPart_000_0010_01C36CDB.6ED4BFE0--