Re: How to send all packets to a router

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On February 24, 2002 12:18 pm, Karina wrote:
> Hi, i have this problem..
>
> I have an iptables-box, that is the default gateway for all my internal
> addresses, after this box all the packets are sending to my main router.
> But now, I need to send one of my internal Class C to another router
> instead of the main one.
>
> I try with this line:
>
> $IPTABLES -T NAT -a PREROUTING -i eth0 -s $THISCLASS -j DNAT --to
> other.router.ip
>
> but it seems this is not working.
>
> If i setup a computer and i put as gateway directly the new router ip
> all works. But , if i setup this same comptuer and i put as gateway my
> iptables-box (all the computers have this settings) this doesn't work.
> The packets sent by my other ip addresses are going to main router as
> usual, but the other class is not going to the alternate router.
>
> Any ideas ?

	Perhaps you have the order of the NAT rules incorrect?
	This rule should occurr in the table *before* the default one
	that routes the rest of your network.

	Alistair


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux