Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Vigneswaran R <vignesh@atc.tcs.com>
To: "netfilter@vger.kernel.org" <netfilter@vger.kernel.org>
Cc: piotr.pawlowski@goyello.com
Subject: Re: Remote IP in packet sent from WAN to LAN
Date: Tue, 23 Apr 2013 10:11:19 +0530	[thread overview]
Message-ID: <517610EF.2020009@atc.tcs.com> (raw)
In-Reply-To: <47E0AF00D6313049B892E93D60AACDCA45C7730F@AMSPRD0410MB361.eurprd04.prod.outlook.com>

On 04/19/2013 06:20 PM, Piotr Paw³owski wrote:
> Not exactly.
> On the iptables-based router there is port forwarding to services running on servers inside LAN. I.e. WWW server is running on 192.168.1.2:80 , in iptables I have port forwarding (nat/prerouting) from external IP (2.3.4.5:80) to 192.168.1.2:80 . Now on 192.168.1.2 in WWW access logs I see internal IP of the router instead of remote IP of the client, which requested 2.3.4.5:80 in browser.

1. Instead of using iptables-based port forwarding (DNAT), if you use 
some reverse proxy (eg., apache) on the router, I think you can log the 
actual client IP by following the instructions in the below URL (taken 
from Humberto Juca's mail).

http://engi.neir.org/tips-tricks/fix-apache-proxy-logging/

2. Otherwise, you can LOG the packet on the router before doing DNAT. 
Then the router log and webserver log together can make some sense 
(provided that the servers are time synchronized).


Regards,
Vignesh


      parent reply	other threads:[~2013-04-23  4:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-19  7:40 Remote IP in packet sent from WAN to LAN Piotr Pawłowski
2013-04-19 11:07 ` Humberto Jucá
2013-04-19 11:13 ` Ambroz Bizjak
2013-04-19 12:50   ` Piotr Pawłowski
2013-04-19 13:03     ` Ambroz Bizjak
2013-04-23  4:41     ` Vigneswaran R [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=517610EF.2020009@atc.tcs.com \
    --to=vignesh@atc.tcs.com \
    --cc=netfilter@vger.kernel.org \
    --cc=piotr.pawlowski@goyello.com \
    /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