Re: How to send all packets to a router

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

 



I don't think the location of the rule is the problem. It seems that this line
is changing the final destination ip, instead of setting a next hop for my
route, i think this because if i ping an external host as yahoo, the ping
command returns me values or <10 ms , that are exactly the same values for the
ping for the alternate router. So the ping is not reaching yahoo, it seems is
reaching only the router as a final destination, instead of routing the
packets.


Karina.


Alistair Tonner wrote:

> 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

--
LSCI Karina Gómez Salgado
mailto:kgs@acabtu.com.mx
Systems Administrator & Web Projects Manager

BTU Comunicación, S.A. de C.V.





[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