mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* Linux Router
@ 2007-09-22 23:09 Carlos Narváez
  2007-09-22 23:38 ` Not kernel dev related story (Re: Linux Router) Oleg Verych
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Carlos Narváez @ 2007-09-22 23:09 UTC (permalink / raw)
  To: linux-kernel

 This is starting to frustrate me, because it should be much simpler
than it seems to be, and I feel like I'm missing something small and
obvious.

I have two private networks, we'll say 192.168.254.0/24 and
192.168.251.0/24. And I have a linux box in the middle with addresses
192.168.254.17 and 192.168.251.10:


+---------------+ . +----------------+
¦ 192.168.251.1 +---+ 192.168.251.10 ¦ . +----------------+
+---------------+ . ¦ 192.168.254.17 +---+ 192.168.254.16 ¦
. . . . . . . . . . +----------------+ . +----------------+


There is no NAT involved.. I just want the box in the middle to pass
traffic between the two networks. Here is what I have done:

- IP Forwarding has been enabled on the router via "echo 1 >
/proc/sys/net/ipv4/ip_forward"

- A route has been configured on 192.168.251.1 to point all traffic
for 192.168.254.0/24 to 192.168.251.10.

- A route has been configured on 192.168.254.16 to point all traffic
for 192.168.251.0/24 to 192.168.254.17.

- The command "iptables -I FORWARD -j ACCEPT" has been executed.

Now.. here's what happens. 192.168.251.10 can ping both interfaces on
the router. 192.168.254.16 can also ping both interfaces on the
router. However, 192.168.251.1 cannot ping 192.168.254.16, and
likewise, 192.168.254.16 cannot ping 192.168.251.1.

What have I forgotten?

-- 
Carlos Narváez
http://www.juegopixel.com

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

* Not kernel dev related story (Re: Linux Router)
  2007-09-22 23:09 Linux Router Carlos Narváez
@ 2007-09-22 23:38 ` Oleg Verych
  2007-09-23  2:10 ` Linux Router ben soo
  2007-09-23  6:39 ` Benny Amorsen
  2 siblings, 0 replies; 5+ messages in thread
From: Oleg Verych @ 2007-09-22 23:38 UTC (permalink / raw)
  To: Carlos NarvАez; +Cc: linux-kernel

* Sat, 22 Sep 2007 18:09:15 -0500

>  This is starting to frustrate me, because it should be much simpler
> than it seems to be, and I feel like I'm missing something small and
> obvious.

Please address such questions to any user forum, or to
<linux-net@vger.kernel.org> otherwise.

While doing that, provide exact output of route and firewall tables,
but not just semi hand-waving with just one command.

Thank you.
____

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

* Re: Linux Router
  2007-09-22 23:09 Linux Router Carlos Narváez
  2007-09-22 23:38 ` Not kernel dev related story (Re: Linux Router) Oleg Verych
@ 2007-09-23  2:10 ` ben soo
  2007-09-23  6:25   ` Jan Engelhardt
  2007-09-23  6:39 ` Benny Amorsen
  2 siblings, 1 reply; 5+ messages in thread
From: ben soo @ 2007-09-23  2:10 UTC (permalink / raw)
  To: Carlos Narváez, Kernel Mailing list

i used to add proxy arp's on the router when i had problems like 
this.  Dunno if it's the recommended fix, but it worked.

http://en.wikipedia.org/wiki/Proxy_arp

Carlos Narváez wrote:
>  This is starting to frustrate me, because it should be much simpler
> than it seems to be, and I feel like I'm missing something small and
> obvious.
> 
> I have two private networks, we'll say 192.168.254.0/24 and
> 192.168.251.0/24. And I have a linux box in the middle with addresses
> 192.168.254.17 and 192.168.251.10:
> 
> 
> +---------------+ . +----------------+
> ¦ 192.168.251.1 +---+ 192.168.251.10 ¦ . +----------------+
> +---------------+ . ¦ 192.168.254.17 +---+ 192.168.254.16 ¦
> . . . . . . . . . . +----------------+ . +----------------+
> 
> 
> There is no NAT involved.. I just want the box in the middle to pass
> traffic between the two networks. Here is what I have done:
> 
> - IP Forwarding has been enabled on the router via "echo 1 >
> /proc/sys/net/ipv4/ip_forward"
> 
> - A route has been configured on 192.168.251.1 to point all traffic
> for 192.168.254.0/24 to 192.168.251.10.
> 
> - A route has been configured on 192.168.254.16 to point all traffic
> for 192.168.251.0/24 to 192.168.254.17.
> 
> - The command "iptables -I FORWARD -j ACCEPT" has been executed.
> 
> Now.. here's what happens. 192.168.251.10 can ping both interfaces on
> the router. 192.168.254.16 can also ping both interfaces on the
> router. However, 192.168.251.1 cannot ping 192.168.254.16, and
> likewise, 192.168.254.16 cannot ping 192.168.251.1.
> 
> What have I forgotten?
> 


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

* Re: Linux Router
  2007-09-23  2:10 ` Linux Router ben soo
@ 2007-09-23  6:25   ` Jan Engelhardt
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Engelhardt @ 2007-09-23  6:25 UTC (permalink / raw)
  To: ben soo; +Cc: Carlos Narváez, Kernel Mailing list


On Sep 22 2007 22:10, ben soo wrote:
>
> i used to add proxy arp's on the router when i had problems like this.  Dunno
> if it's the recommended fix, but it worked.

There is certainly no Proxy ARP required here since you do not
do subnet sharing or funny games like that.

> http://en.wikipedia.org/wiki/Proxy_arp
>
> Carlos Narváez wrote:
>> +---------------+ . +----------------+
>> ¦ 192.168.251.1 +---+ 192.168.251.10 ¦ . +----------------+
>> +---------------+ . ¦ 192.168.254.17 +---+ 192.168.254.16 ¦
>> . . . . . . . . . . +----------------+ . +----------------+
>> 
>> - A route has been configured on 192.168.251.1 to point all traffic
>> for 192.168.254.0/24 to 192.168.251.10.
>> 
>> - A route has been configured on 192.168.254.16 to point all traffic
>> for 192.168.251.0/24 to 192.168.254.17.
>> 
>> - The command "iptables -I FORWARD -j ACCEPT" has been executed.

Well, and do the counters increase?

>> Now.. here's what happens. 192.168.251.10 can ping both interfaces on
>> the router. 192.168.254.16 can also ping both interfaces on the
>> router. However, 192.168.251.1 cannot ping 192.168.254.16, and
>> likewise, 192.168.254.16 cannot ping 192.168.251.1.
>> 
>> What have I forgotten?

Default GWs (though if you ahve routes, ok..).

On 251.1, use `ip r g 192.168.254.16` and it should
show "192.168.254.16 via 192.168.251.10 dev eth0 ...".

Same on the other side.

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

* Re: Linux Router
  2007-09-22 23:09 Linux Router Carlos Narváez
  2007-09-22 23:38 ` Not kernel dev related story (Re: Linux Router) Oleg Verych
  2007-09-23  2:10 ` Linux Router ben soo
@ 2007-09-23  6:39 ` Benny Amorsen
  2 siblings, 0 replies; 5+ messages in thread
From: Benny Amorsen @ 2007-09-23  6:39 UTC (permalink / raw)
  To: linux-kernel

>>>>> "CN" == Carlos Narváez <crakup@gmail.com> writes:

CN> - IP Forwarding has been enabled on the router via "echo 1 >
CN> /proc/sys/net/ipv4/ip_forward"

Try cat /proc/sys/net/ipv4/conf/*/forwarding. If any of them are 0,
then echo 1 > /proc/sys/net/ipv4/conf/all/forwarding.


/Benny



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

end of thread, other threads:[~2007-09-23  6:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-22 23:09 Linux Router Carlos Narváez
2007-09-22 23:38 ` Not kernel dev related story (Re: Linux Router) Oleg Verych
2007-09-23  2:10 ` Linux Router ben soo
2007-09-23  6:25   ` Jan Engelhardt
2007-09-23  6:39 ` Benny Amorsen

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

all inboxes | Powered by JetHome®