From: Lopsch <lopsch@lopsch.com>
To: netfilter@lists.netfilter.org
Subject: Re: SNAT Question
Date: Tue, 14 Dec 2004 18:51:53 +0100 [thread overview]
Message-ID: <41BF2839.4050001@lopsch.com> (raw)
In-Reply-To: <20041214173955.BA009410721@mailroute.thevine.net>
[-- Attachment #1: Type: text/plain, Size: 1090 bytes --]
Burton schrieb:
> I need help setting up a server I am working with.
>
> I am not very knowledgeable in regards to Linux.
>
> With that in mind I have read several HOWTO's and I am convinced that SNAT
> is what I need to do this.
>
> What I am trying to do is I have to servers on two different T1's located on
> the same switch.
>
> I would like server1 (my Linux Server) to accept an incoming connecting via
> its IP address on T1(1) 12..22.81.18 on port 10025 and forward that request
> to server2(my Windows Mail Server) on T1(2) 204.250.113.2 on port 25
>
> I have tried several combinations of
> iptables -t nat -A POSTROUTING -p tcp -o eth0 -j SNAT --dport 10025 --to
> 204.250.113.2:25
>
> What am I doing wrong or am I looking at the wrong tool.
>
>
>
You need DNAT not SNAT ;). And you need a apropriate FORWARD rule if
your default policy is DROP.
iptables -t nat -A PREROUTING -i ethx -p tcp --dport 10025 -j DNAT --to
204.250.113.2:25
iptables -t filter -A FORWARD -i ethx -d 204.250.113.2 -o ethx -p tcp
--dport 25 -j ACCEPT
--
PGP-ID 0xF8EAF138
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 825 bytes --]
next prev parent reply other threads:[~2004-12-14 17:51 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-14 17:30 SNAT Question Burton
2004-12-14 17:51 ` Lopsch [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-11-15 18:33 SNAT question Gary W. Smith
2004-11-14 22:53 Gary W. Smith
[not found] <20040917181300.76253.qmail@web61109.mail.yahoo.com>
2004-09-18 21:46 ` Alexey Toptygin
2004-09-19 17:10 ` darmian martinez
2004-09-21 13:11 ` Jason Opperisano
2004-09-16 17:20 darmian martinez
2004-09-17 20:48 ` John A. Sullivan III
2004-03-01 23:56 Felipe
2004-03-02 0:22 ` Antony Stone
2004-03-02 1:28 ` Felipe
2004-02-20 20:15 John Black
2004-02-20 21:05 ` Antony Stone
2004-02-21 3:33 ` John Black
2004-02-20 21:08 ` John A. Sullivan III
2003-01-27 19:46 Jean-Rene Cormier
2002-10-31 12:18 mailinglists
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=41BF2839.4050001@lopsch.com \
--to=lopsch@lopsch.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.