From: "Mark Alzino" Subject: DNS and iptables : is this rule bad ?? Date: Fri, 28 May 2004 15:26:38 +0000 Sender: netfilter-admin@lists.netfilter.org Message-ID: Mime-Version: 1.0 Return-path: Errors-To: netfilter-admin@lists.netfilter.org List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: Content-Type: text/plain; charset="iso-8859-1"; format="flowed" Content-Transfer-Encoding: quoted-printable To: netfilter@lists.netfilter.org Hello, Here is my problem more simply explained ... An user (IP address : 10.0.0.1) has a DNS server IP address specified in hi= s=20 configuration (we don't know the address, and maybe this address is invalid= =20 so we want to change it with a iptables rules). His gateway is 10.0.0.254. The gateway has another interface at=20 192.168.100.254 where a DNS server is launch (by named). At the gateway, a iptables rule send all his DNS packets at the DNS server = (192.168.100.254) The rule is : iptables -A PREROUTING -t nat -s 10.0.0.1 -p UDP --dport 53 -j DNAT=20 --to-destination 192.168.100.254 ** BUT ** this rule is not effective immediately, and take fews minutes=20 before to be active !!! Same thing if you flush the nat table (iptables -F PREROUTING -t nat ) : th= e=20 last DNS is active during some minutes (sometimes immediately but not=20 systematically)... To easely see that : just put an invalid DNS server in the configuration of= =20 the client, and a real one at the gateway (192.168.100.254). You will see=20 that rules are not immediately active !!! Is someone know why ??? Thanks. -- Mark _________________________________________________________________ Bloquez les fen=EAtres pop-up, c'est gratuit ! http://toolbar.msn.fr