Linux Netfilter discussions
 help / color / mirror / Atom feed
* RE: bidirectional forwarding
@ 2004-07-28 13:13 Jason Opperisano
  2004-07-29  5:04 ` Frans Luteijn
  0 siblings, 1 reply; 6+ messages in thread
From: Jason Opperisano @ 2004-07-28 13:13 UTC (permalink / raw)
  To: Itrat Rasod Quadri, netfilter

> PC1               R1           R2           R3           R4            PC2
> |---------------|   |-------|    |--------|   |--------|   |-----------|
> 192.168.10.2   .1  12.1    12.2 13.1     13.2 16.1    16.2 11.1       11.2
> e0             e0   e1     e0   e1        e0  e1       e0  e1          e0

assuming:

  default gw of pc1 is 10.1
  default gw of r1 is 12.2

  default gw of pc2 is 11.1
  default gw of r4 is 16.1

both r2 & r3 will need static routes telling them how to get to networks 10 and 11:

on r2:

  192.168.10.0/24 via 192.168.12.1
  192.168.11.0/24 via 192.168.13.2

on r3:

  192.168.10.0/24 via 192.168.13.1
  192.168.11.0/24 via 192.168.16.2

the output of:

  ip route get 192.168.10.2
  ip route get 192.168.11.2

on r2 and r3 should clue you in to where the packets are going.

HTH...

-j


^ permalink raw reply	[flat|nested] 6+ messages in thread
* RE: bidirectional forwarding
@ 2004-07-29 12:05 Jason Opperisano
  0 siblings, 0 replies; 6+ messages in thread
From: Jason Opperisano @ 2004-07-29 12:05 UTC (permalink / raw)
  To: Frans Luteijn, netfilter

> Jason Opperisano schreef:
>
> > > PC1               R1           R2           R3           R4            PC2
> > > |---------------|   |-------|    |--------|   |--------|   |-----------|
> > > 192.168.10.2   .1  12.1    12.2 13.1     13.2 16.1    16.2 11.1       11.2
> > > e0             e0   e1     e0   e1        e0  e1       e0  e1          e0
> >
> > assuming:
> >
> >   default gw of pc1 is 10.1
> >   default gw of r1 is 12.2
> >
> >   default gw of pc2 is 11.1
> >   default gw of r4 is 16.1
> >
> > both r2 & r3 will need static routes telling them how to get to networks 10 and 11:
> >
> > on r2:
> >
> >   192.168.10.0/24 via 192.168.12.1
> >   192.168.11.0/24 via 192.168.13.2
>
> How cat r2 reach your 16-network? you will need to add a routing for
> that network to.

why does r2 need to know how to get to the 16 network?  IIRC--the OP never indicated an interest in a "fully-routed" environment.  as long as 10.2 can talk to 11.2 and vice versa--everyone's happy.  the transport networks are irrelevant to the solution and would only serve to distract from the real problem.

>
> Routingprotocols are designed for this kind of problem, to get this
> resolved
> automaticly. In this case you might look at zebra.

uh huh.  my personal opinion is that dynamic routing protocols on firewalls are a Bad Idea (tm), and should only be used when necessary (in networks with redundant paths that must be learned automatically).  the scenario above does not meet this criteria.  also, (again my opinion)--routing transport networks (i.e. networks that will never have traffic that sources from or is destined to them) is just a waste of time.  finally, i think if people took the time to understand how to statically route an environment before spewing "redistribute everything" statements all over their router configs--they might actually end up understanding what's going on.

not saying that the OP might not *want* a fully routed environment, but saying that these additional routes are *needed* is simply not correct, and will only serve to continue to confuse those that have a hard enough time understanding routing to begin with (not implying that i'm not in that group myself).  :-D

-j


^ permalink raw reply	[flat|nested] 6+ messages in thread
* bidirectional forwarding
@ 2004-07-28  1:20 Itrat Rasod Quadri
  2004-07-28 10:41 ` Antony Stone
  2004-07-29 17:46 ` James Sneeringer
  0 siblings, 2 replies; 6+ messages in thread
From: Itrat Rasod Quadri @ 2004-07-28  1:20 UTC (permalink / raw)
  To: netfilter

Hello,

I have setup linux routers as shown below

PC1               R1           R2           R3           R4            PC2
|---------------|   |-------|    |--------|   |--------|   |-----------|
192.168.10.2   .1  12.1    12.2 13.1     13.2 16.1    16.2 11.1       11.2
e0             e0   e1     e0   e1        e0  e1       e0  e1          e0

I am able to send traffic from PC1 to PC2 but I am unable to receive the 
response beyond R3. I am able to set up a bi directional path from R1 to R4 
but unbelievably I can't seem to do the same for PC1 and PC2. Response from a 
ping from PC2 doesn't go beyond e0 of R3.

I have the following settings at R3

iptables -F
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -A INPUT -i eth0 -d 192.168.11.2 -j ACCEPT
iptables -A FORWARD -i eth0 -d 192.168.11.2 -j ACCEPT
iptables -A OUTPUT -o eth1 -d 192.168.11.2 -j ACCEPT
iptables -A INPUT -i eth1 -d 192.168.10.2 -j ACCEPT
iptables -A FORWARD -i eth1 -d 192.168.10.2 -j ACCEPT
iptables -A OUTPUT -i eth0 -d 192.168.10.2 -j ACCEPT

I have set the default route as

route add default gw 192.168.16.2 dev eth1

Using tcpdump I can see the ping response at eth1 of R3 but it doesn't go 
beyond that. I tried to add another default route for eth0 as

route add default gw 192.168.13.1 dev eth0

but then the traffic from PC1 doesn't go beyond eth0. Any help will be most 
welcome.

Thanks in advance.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2004-07-29 17:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-28 13:13 bidirectional forwarding Jason Opperisano
2004-07-29  5:04 ` Frans Luteijn
  -- strict thread matches above, loose matches on Subject: below --
2004-07-29 12:05 Jason Opperisano
2004-07-28  1:20 Itrat Rasod Quadri
2004-07-28 10:41 ` Antony Stone
2004-07-29 17:46 ` James Sneeringer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox