LARTC
[Top] [All Lists]

[LARTC] Re: Troubles DNATing UDP

To: dAm2K <dam2000@gmail.com>
Subject: [LARTC] Re: Troubles DNATing UDP
From: Покотиленко Костик <casper@meteor.dp.ua>
Date: Mon, 13 Nov 2006 09:23:33 +0200
Cc: lartc@mailman.ds9a.nl
Delivered-to: sp-com-lists@consult.net
Delivered-to: lartc-list@securepoint.com
Delivered-to: lartc@outpost.ds9a.nl
In-reply-to: <2855d4bf0611100739m61be108bv73d289593ff7a84c@mail.gmail.com>
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: <1162910458.32208.44.camel@localhost.localdomain> <1163158657.4061.3.camel@localhost.localdomain> <2855d4bf0611100739m61be108bv73d289593ff7a84c@mail.gmail.com>
Reply-to: casper@meteor.dp.ua
Sender: lartc-bounces@mailman.ds9a.nl
В Птн, 10/11/2006 в 16:39 +0100, dAm2K пишет:
> > > Once again, all those packets reach INPUT chain, rules in -t nat -I
> > > PREROUTING not working.
> > >
> > > So here is the question: Does the UDP is being DNAT'ed differently
> > > comparing with TCP? What is the difference? How can I DNAT them?
> 
> If your HW UDP pinger's default gateway is your natting firewall, try
> to ping directly the 192.168.1.2 web server. If default gateway is
> another router, try adding the route 192.168.1.0/25 to you HW pingers
> and ping directly 192.168.1.2.

That would probably help, but it is not desirable. The topology may
change, so it's better ping the closest roouter and to natting in it.

> If this is not possible (and you are UDP pinging you firewall) open
> dport 4000 udp in INPUT chain on your firewall and do natting:
> 
> iptables -t filter -A INPUT -p udp -m udp -s 10.10.0.0/16 -d
> 10.10.100.1 --dport 4000 -j ACCEPT
> iptables -t nat -A PREROUTING -p udp -m udp -s 10.10.0.0/16 -d
> 10.10.100.1 --dport 4000 -j DNAT --to-destination 192.168.1.2
> 
> This way 192.168.1.2 host should receive udp packets coming from the firewall.

This is what I've done. But, packets are reaching INPUT chain, counters
of the first rule are increasing, and packets are not reaching second
rule, it's counters are zero all the time. And DNAT'ing not working :/

> My setup is running smoothly with UDP and NAT, I'm using with
> playstation online games...
> 
> Hope this help. Bye, Dino.
> 
-- 
Покотиленко Костик <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>