From: Grant Taylor <gtaylor@riverviewtech.net>
To: netfilter@lists.netfilter.org
Subject: Re: Forward to DMZ addresses
Date: Mon, 15 Aug 2005 00:31:20 -0500 [thread overview]
Message-ID: <430028A8.3090508@riverviewtech.net> (raw)
In-Reply-To: <57933.67.53.150.63.1123957195.squirrel@mail.innovativesource.net>
Jonathan, are you needing to add a rule to your nat table PREROUTING chain to cause any (ssh) traffic that is destined to your firewall's WAN interface to be redirected over to your DMZ server? If so you just need to add a rule like this:
iptables -t nat -A PREROUTING -i eth1 -d xx.xx.xx.xx -p tcp --dport 22 -j DNAT --to-destination yy.yy.yy.yy
Where xx.xx.xx.xx is your globally routable WAN IP and yy.yy.yy.yy is the IP of your DMZ server.
Grant. . . .
jonathan@innovativesource.net wrote:
> I have a machine that I using as a firewall, separting WAN / LAN / DMZ
>
> Rules thus far are to NAT all outgoing packets that come in from the LAN
> interface.
>
>>From the machine itself, I can ping machines on my DMZ interface (eth2)
> and my LAN interface (eth0)
>
> I'm having trouble getting through the firewall to my DMZ machines, but I
> can access the NIC that routes to the DMZ machine via SSH... I've tried
> various forwarding rules, and even changed the default FORWARD policy to
> ACCEPT anything. Here is a basic rule I'm trying:
>
> #eth1 = WAN NIC
> #eth2 = DMZ NIC
> iptables -A FORWARD -i eth1 -o eth2 -d xx.xx.xx.xx -p tcp --dport 22 -j
> ACCEPT
>
> now, if I do a netstat on the firewall nothing... if I do a netstat on the
> machine I'm attempting to connect from... all I see is SYN_SENT
>
> **I'm trying from external machines...i.e. machines not on my network.
>
> physical network is
>
> router -> vlan -> firewall -> DMZ
> router -> vlan -> firewall -> LAN
>
> I can also access the DMZ machine via the firewall itself and vice versa,
> but once logged into the DMZ machine, I can't get to anything past the
> firewall. I have the following rules for that
>
> iptables -A FORWARD -i eth2 -o eth1 -j ACCEPT
>
> Kinda confused here...
>
> the LAN stuff works... at least for now... to simply forward the packets
> out through the WAN NIC and NAT them...
>
> *shrug*
next prev parent reply other threads:[~2005-08-15 5:31 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-13 18:19 Forward to DMZ addresses jonathan
2005-08-15 5:31 ` Grant Taylor [this message]
2005-08-16 16:15 ` jonathan
2005-08-17 5:53 ` Grant Taylor
2005-08-17 16:04 ` Jonathan Villa
2005-08-18 6:10 ` Grant Taylor
2005-08-18 18:33 ` Jonathan Villa
2005-08-18 19:49 ` Taylor, Grant
2005-08-18 21:00 ` Jonathan Villa
2005-08-19 6:04 ` Grant Taylor
2005-08-19 18:57 ` Jonathan Villa
2005-08-19 22:33 ` Taylor, Grant
2005-08-20 17:30 ` Jonathan Villa
2005-08-20 22:19 ` Grant Taylor
2005-08-22 14:25 ` Jonathan Villa
2005-08-22 21:47 ` Taylor, Grant
2005-08-23 6:54 ` Grant Taylor
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=430028A8.3090508@riverviewtech.net \
--to=gtaylor@riverviewtech.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 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.