All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leonardo Rodrigues <leolistas@solutti.com.br>
To: andy@time-domain.co.uk
Cc: netfilter@vger.kernel.org
Subject: Re: Using iptables to anonymize incoming IP addresses
Date: Wed, 30 Sep 2009 15:38:42 -0300	[thread overview]
Message-ID: <4AC3A5B2.7080804@solutti.com.br> (raw)
In-Reply-To: <Pine.LNX.4.58.0909301456490.29957@virt1.netstat-a.net>

andy thomas escreveu:
> But, I want all the packets received by the webserver to appear to be
> coming from the address 192.168.1.1, not the external public IP address
> they really came from, eg the apache logs will show all page requests as
> coming from 192.168.1.1. Can this be done with iptables?
>   

    sure !!! Pretty simple.

    you'll need a DNAT rule for the 80 port forwarding

    and you'll need a SNAT rule to, to make the firewall source-nat all 
connections 'going' to your real webserver

192.168.1.1 = your firewall
192.168.1.200 = your real web server


iptables -t nat -A POSTROUTING -p tcp --dport 80 -d 192.168.1.200 -j 
SNAT --to-source 192.168.1.1


-- 


	Atenciosamente / Sincerily,
	Leonardo Rodrigues
	Solutti Tecnologia
	http://www.solutti.com.br

	Minha armadilha de SPAM, NÃO mandem email
	gertrudes@solutti.com.br
	My SPAMTRAP, do not email it





  parent reply	other threads:[~2009-09-30 18:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-30 14:14 Using iptables to anonymize incoming IP addresses andy thomas
2009-09-30 14:45 ` Richard Horton
2009-09-30 18:38 ` Leonardo Rodrigues [this message]
2009-10-01 15:37   ` andy thomas

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=4AC3A5B2.7080804@solutti.com.br \
    --to=leolistas@solutti.com.br \
    --cc=andy@time-domain.co.uk \
    --cc=netfilter@vger.kernel.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.