From: ads nat <adsnat@yahoo.com>
To: George Vieira <georgev@citadelcomputer.com.au>,
netfilter@lists.netfilter.org
Subject: RE: SMTP HTTP port allow
Date: Wed, 27 Aug 2003 04:49:58 -0700 (PDT) [thread overview]
Message-ID: <20030827114958.60579.qmail@web20704.mail.yahoo.com> (raw)
In-Reply-To: <FDEMKKNJDLAJDPNDPCDDMEHBNFAA.georgev@citadelcomputer.com.au>
[-- Attachment #1: Type: text/plain, Size: 1925 bytes --]
My code has become as follows :
******
iptables -A POSTROUTING -t nat -p tcp --dport 25 -j MASQUERADE
iptables -A POSTROUTING -t nat -p tcp -s 192.168.0.42 -d 207.106.22.35 --dport 21 -j MASQUERADE
iptables -A POSTROUTING -t nat -p tcp -s 192.168.0.23 -d 207.106.22.35 --dport 21 -j MASQUERADE
iptables -t nat -A PREROUTING -p TCP --dport 80 -j REDIRECT --to-port 3128
*****
Is this O.K.
Thanks
George Vieira <georgev@citadelcomputer.com.au> wrote:
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
---------------------------------
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
[-- Attachment #2: Type: text/html, Size: 3575 bytes --]
next prev parent reply other threads:[~2003-08-27 11:49 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-27 6:52 SMTP HTTP port allow ads nat
2003-08-27 10:40 ` George Vieira
2003-08-27 11:49 ` ads nat [this message]
2003-08-27 15:38 ` Ramin Dousti
2003-08-27 13:13 ` Jeffrey Laramie
-- strict thread matches above, loose matches on Subject: below --
2003-08-29 1:25 George Vieira
2003-08-29 10:13 ` ads nat
2003-08-30 7:23 ` ads nat
2003-08-30 10:15 ` ads nat
2003-08-30 13:11 ads nat
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030827114958.60579.qmail@web20704.mail.yahoo.com \
--to=adsnat@yahoo.com \
--cc=georgev@citadelcomputer.com.au \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox