Linux Netfilter discussions
 help / color / mirror / Atom feed
* doing prerouting/postrouting/output logfile problems
@ 2002-10-21 13:57 Sander Sneekes
  2002-10-21 15:09 ` Antony Stone
  0 siblings, 1 reply; 4+ messages in thread
From: Sander Sneekes @ 2002-10-21 13:57 UTC (permalink / raw)
  To: netfilter

Hi,

I got a firewall (redhat 7.2/iptables) with behind it a couple of
servers running apache/mail etc.

Now i have 36 public ip's and for the outside it seems like the
server are running public ip's i do that as followed :

firewall
eth0 = x.x.x.x (public ip)
eth1 = 192.168.2.1 (internal ip)

webserver

eth0 = 192.168.2.2

 ${IPTABLES} -t nat -A PREROUTING -p tcp -d x.x.x.x --dport 80 -j DNAT
--to-destination 192.168.2.2
        
 ${IPTABLES} -t nat -A POSTROUTING -p tcp -d 192.168.2.2 --dport 80 -j
SNAT --to-source 192.168.2.1
        
 ${IPTABLES} -t nat -A OUTPUT -p tcp -d x.x.x.x --dport 80 -j DNAT
--to-destination 192.168.2.2

This work perfect people from the outside using x.x.x.x are getting a
nice website. And also people inside the network using x.x.x.x also
getting a nice site.

But now here is my problem because in the logfile's of the site I get
all entry's coming from 192.168.2.1 instead off when a client viset
our site their ip. How can i solve it.? 

I also use these lines for do mail traffic and I had some problems with
open Relaying. Also because 192.168.2.1 was allowed to mail.

thanks for you help.

Cheers
Sander





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

end of thread, other threads:[~2002-10-21 19:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-21 13:57 doing prerouting/postrouting/output logfile problems Sander Sneekes
2002-10-21 15:09 ` Antony Stone
2002-10-21 17:25   ` Sander Sneekes
2002-10-21 19:02   ` Alistair Tonner

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