LARTC
[Top] [All Lists]

Re: [LARTC] catching DNAT'ed packet

To: lartc@mailman.ds9a.nl
Subject: Re: [LARTC] catching DNAT'ed packet
From: Покотиленко Костик <casper@meteor.dp.ua>
Date: Tue, 19 Dec 2006 12:01:53 +0200
Delivered-to: sp-com-lists@consult.net
Delivered-to: lartc-list@securepoint.com
Delivered-to: lartc@outpost.ds9a.nl
In-reply-to: <1166204683.4051.36.camel@localhost.localdomain>
List-archive: <http://mailman.ds9a.nl/pipermail/lartc>
List-help: <mailto:lartc-request@mailman.ds9a.nl?subject=help>
List-id: "Mailinglist of the Linux Advanced Routing &amp; Traffic Control project" <lartc.mailman.ds9a.nl>
List-post: <mailto:lartc@mailman.ds9a.nl>
List-subscribe: <http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc>, <mailto:lartc-request@mailman.ds9a.nl?subject=subscribe>
List-unsubscribe: <http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc>, <mailto:lartc-request@mailman.ds9a.nl?subject=unsubscribe>
Organization: СК "Метеор"
References: <1166204683.4051.36.camel@localhost.localdomain>
Reply-to: casper@meteor.dp.ua
Sender: lartc-bounces@mailman.ds9a.nl
Maybe my question was too complex, I would try to make it simple...

Is it possible to catch un-DNAT'ed packet with -j ULOG target?

В Птн, 15/12/2006 в 19:44 +0200, Покотиленко Костик пишет:
> Hi.
> 
> I have a Server's network with some servers in it, all with
> 192.168.1.0/25 ips. There is also a router in that network with ip
> 192.168.1.1. This router also connected to a client's network
> 10.10.0.0/16 with ip 10.10.100.1.
> 
> All services on each server are given their virtual address from one of
> two virtual networks 192.168.1.128/28 and 192.168.1.144/28.
> 192.168.1.128/28 is for freely available services, and 192.168.1.144/28
> is for services available only to authenticated ips.
> 
> There is a DNAT working on the router to map virtual ip/port to
> realip/realport. That all works fine.
> 
> For axample:
>  users connecting to 192.168.1.129:80 are brought to 192.168.1.2:80
>  users connecting to 192.168.1.145:80 are brought to 192.168.1.2:81
> 
> I have to put all traffic I need for accounting to "-j ULOG
> --ulog-nlgroup 10". And, packets should have ips seen to users. For
> axample:
> 
>  10.10.102.50 -> 192.168.1.145:80
>  192.168.1.145:80 -> 10.10.102.50
> and
>  10.10.102.50 -> 192.168.1.129:80
>  192.168.1.129:80 -> 10.10.102.50
> 
> BUT, instead I have:
> 
>  10.10.102.50 -> 192.168.1.145:80
>  192.168.1.2:81 -> 10.10.102.50
> and
>  10.10.102.50 -> 192.168.1.129:80
>  192.168.1.2:80 -> 10.10.102.50
> 
> So, I can ulog the packet's in "state seen by users" only in
> client->server direction, and I was unable to do that in server-clients
> direction!
> 
> Here are iptables rules (I don't want to ulog packets to/from the router
> itself):
> 
> iptables -t mangle -A PREROUTING -i br0 -j IPCAD_out
> iptables -t mangle -A POSTROUTING -o br0 -j IPCAD_in
> 
> iptables -t mangle -A IPCAD_out -d 10.10.100.1 -j RETURN
> iptables -t mangle -A IPCAD_out -d 192.168.1.1 -j RETURN
> iptables -t mangle -A IPCAD_out -j ULOG --ulog-nlgroup 10
> 
> iptables -t mangle -A IPCAD_in -s 10.10.100.1 -j RETURN
> iptables -t mangle -A IPCAD_in -s 192.168.1.1 -j RETURN
> iptables -t mangle -A IPCAD_in -j ULOG --ulog-nlgroup 10
> 
> Is it possible to catch un-DNAT'ed packet???
> 
-- 
Покотиленко Костик <casper@meteor.dp.ua>

_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

<Prev in Thread] Current Thread [Next in Thread>