Linux Netfilter discussions
 help / color / mirror / Atom feed
* DMZ issue - redirect works as expected but behaviour not desired
@ 2011-02-19 20:55 Feasey, Nicholas
  2011-02-19 23:10 ` Pascal Hambourg
  0 siblings, 1 reply; 12+ messages in thread
From: Feasey, Nicholas @ 2011-02-19 20:55 UTC (permalink / raw)
  To: netfilter@vger.kernel.org

[-- Attachment #1: Type: text/plain, Size: 1337 bytes --]

I'm setting up a box that will be the only device on the Internet and will forward requested services to other servers sitting on a DMZ.

As a test I started with redirecting a web server.

To test my arrangement I first merely set up a simple masquerade (just on my internal network) in my iptables like so:

*nat
:PREROUTING ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
-A PREROUTING -p tcp -i eth0 --dport 80 -j DNAT --to 192.168.40.15
-A POSTROUTING -j MASQUERADE
*filter
...normal filtering lines follow.

This POSTROUTING entry works as well:

-A POSTROUTING -o eth0 -j SNAT --to-source 192.168.40.15

I think this is because the above line is doing the same as the shortcut MASQUERADE.

When I check the httpd access_log it shows that the connection came from 192.168.40.15 as expected.  It works.

However, I need the logs to show the actual originating IP address for tracking purposes, statistics, etc.  Basically as I move forward we will need our logs to show connections from the actual IP address so I assume NAT'ing is out and I'm just barking up the wrong tree here.

Is there a way to do this?

Am I just totally confused and should be using a squid proxy or some such thing instead of iptables - both?

Any assistance in pointing me in the right direction would be greatly appreciated.

Nicholas

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 3691 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-02-24  0:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-19 20:55 DMZ issue - redirect works as expected but behaviour not desired Feasey, Nicholas
2011-02-19 23:10 ` Pascal Hambourg
2011-02-20  0:24   ` Feasey, Nicholas
     [not found]     ` <AANLkTi=rkXhB9UC=jG_wfF3P0MRjk4z-BVWjx4w=gb3m@mail.gmail.com>
2011-02-20  1:34       ` Pandu Poluan
2011-02-20  2:58       ` Feasey, Nicholas
2011-02-20  5:24         ` Pandu Poluan
2011-02-20  6:07           ` Feasey, Nicholas
2011-02-20 14:37             ` Pandu Poluan
2011-02-23  1:31               ` Feasey, Nicholas
2011-02-23  6:17                 ` Pandu Poluan
2011-02-23 17:02                   ` Feasey, Nicholas
2011-02-24  0:19                     ` Pandu Poluan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox