From mboxrd@z Thu Jan 1 00:00:00 1970 From: Aleksandar Milivojevic Subject: Re: Multiple iptables exceptions? Date: Thu, 23 Sep 2004 10:23:39 -0500 Sender: netfilter-bounces@lists.netfilter.org Message-ID: <4152EA7B.3010802@pbl.ca> References: Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: netfilter-bounces@lists.netfilter.org Content-Type: text/plain; charset="us-ascii"; format="flowed" To: netfilter@lists.netfilter.org Jaret wrote: > conceptually what im looking for is something like this... > > IPTABLES -t nat -A PREROUTING -s 10.1.1.2 -d ! 207.46.0.0/16, > 64.4.0.0/16 --proto tcp --dport 80 -j DNAT --to-destination > 10.1.1.3:80 You can try using user defined chain. Add source, protocol and port options back into three PREROUTING rules, I left them out for clarity: iptables -t nat -N MS iptables -t nat -A MS -j ACCEPT iptables -t nat -A PREROUTING -d 207.46.0.0/16 -j MS iptables -t nat -A PREROUTING -d 64.4.0.0/16 -j MS iptables -t nat -A PREROUTING -j DNAT --to-destination 10.1.1.3:80 -- Aleksandar Milivojevic Pollard Banknote Limited Systems Administrator 1499 Buffalo Place Tel: (204) 474-2323 ext 276 Winnipeg, MB R3T 1L7