From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jaret Subject: Re: Multiple iptables exceptions? Date: Thu, 23 Sep 2004 13:27:49 -0500 Sender: netfilter-bounces@lists.netfilter.org Message-ID: References: <4152EA7B.3010802@pbl.ca> <995fcdb0040923085916643d3a@mail.gmail.com> Reply-To: Jaret Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <995fcdb0040923085916643d3a@mail.gmail.com> 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" To: Netfilter List Listserves are a beautiful thing. Thanks for the help guys. Worked. On Thu, 23 Sep 2004 16:59:52 +0100, Abdul-Wahid Paterson wrote: > I think it is better to do it this way incase there are other rules > that need to be traversed in the PREROUTING chain. > > iptables -t nat -N MS > iptables -t nat -A MS -d 207.46.0.0/16 -j RETURN > iptables -t nat -A MS -d 64,4,0,0/16 -j RETURN > iptables -t nat -A MS -j DNAT --to-destination 10.1.1.3:80 > iptables -t nat -A PREROUTING -j MS > > Regards, > > Abdul-Wahid > > On Thu, 23 Sep 2004 10:23:39 -0500, Aleksandar Milivojevic > > > wrote: > > 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 > > > > > >