From: Joel Newkirk <netfilter@newkirk.us>
To: Dan Cox <dancox@speakeasy.net>, netfilter@lists.netfilter.org
Subject: Re: redirecting everything to another machine
Date: Fri, 21 Mar 2003 16:40:45 -0500 [thread overview]
Message-ID: <200303211640.45458.netfilter@newkirk.us> (raw)
In-Reply-To: <1048207207.6972.1360.camel@xavier>
On Thursday 20 March 2003 07:40 pm, Dan Cox wrote:
> With iptables how would I redirect all connection attempts coming from
> the Internet interface to a machine inside my DMZ? I also have a LAN
> that I have "masqueraded" though I don't know if thats related. My set
> up is below:
>
> Internet IP/iface = eth0 1.2.3.4
> LAN IP/iface = eth1 192.168.0.1
> DMZ IP/iface = eth2 192.168.1.1
iptables -t nat -A PREROUTING -m state --state NEW -d 1.2.3.4 -p DNAT
--to 192.168.1.x
The NEW match will send new connection attempts to the DNAT IP. Anything
already ESTABLISHED or RELATED will go where it is supposed to, IE
replies to connections from the LAN will go back the the machine they
were SNATted from, continued inbound traffic that is part of a DNATted
connection to the DMZ will continue to go to the DNATted IP in the DMZ.
Make sure your SNAT or MASQUERADE for traffic from the LAN is applied
ONLY to traffic from the LAN by matching "-i eth1" in that rule.
j
> Any help is very much appreciated. Thanks
>
> Dan Cox
prev parent reply other threads:[~2003-03-21 21:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-21 0:40 redirecting everything to another machine Dan Cox
2003-03-21 21:40 ` Joel Newkirk [this message]
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=200303211640.45458.netfilter@newkirk.us \
--to=netfilter@newkirk.us \
--cc=dancox@speakeasy.net \
--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