Confusion setting up routes in Yast

I have 3 NICs
1 is 192.168.2.X
2 is 192.168.3.X
3 is the outside world (and default gateway)

I can ping hosts on either network from my linux host machine.
But a machine on 3.X cannot ping across to 2.X
I know I have to tell the linux machine to send packets from one network to the other, but I cannot figure out how to do it in Yast.

You help would be most appreciated.
Thanks

You want to make your system into a router. I have no experience doing this, but without doubt other will come herte to hlp you. In the meantime you could try searches with “making linux router” or the like.

Thanks for your reply.

I’ve been googling the subject and confusing myself even more.

My routing table looks like:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
host81-136-166- *               255.255.255.248 U     0      0        0 eth3
192.168.3.0     192.168.3.2     255.255.255.0   UG    0      0        0 eth1
192.168.2.0     gateway         255.255.255.0   UG    0      0        0 eth2
link-local      *               255.255.0.0     U     0      0        0 eth1
loopback        *               255.0.0.0       U     0      0        0 lo
default         host81-136-166- 0.0.0.0         UG    0      0        0 eth3

And if have ip forwarding on.

As I said, I can ping hosts on each network from the router, but hosts on each subnet are not aware of each other. I cannot ping from one to the other.

There is no firewall getting in the way at the moment.

Cheers

Again, am not a “build a router into your Linux system” guru (hope one comes to the rescue here), but at least the systems inside both networks should have a route to your system. So their routing tables are even more important then yours.

stovesy wrote:

>
> Thanks for your reply.
>
> I’ve been googling the subject and confusing myself even more.
>
> My routing table looks like:
>
> Code:
> --------------------
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref Use
> Iface
> host81-136-166- * 255.255.255.248 U 0 0 0
> eth3
> 192.168.3.0 192.168.3.2 255.255.255.0 UG 0 0 0
> eth1
> 192.168.2.0 gateway 255.255.255.0 UG 0 0 0
> eth2
> link-local * 255.255.0.0 U 0 0 0
> eth1
> loopback * 255.0.0.0 U 0 0 0
> lo
> default host81-136-166- 0.0.0.0 UG 0 0 0
> eth3
> --------------------
>
>
> And if have ip forwarding on.
>
> As I said, I can ping hosts on each network from the router, but hosts
> on each subnet are not aware of each other. I cannot ping from one to
> the other.
>
> There is no firewall getting in the way at the moment.
>
> Cheers
>
>
as root

echo 1 > /proc/sys/net/ipv4/ip_forward

there’s probably a way of enabling ip_forwarding via YaST but off-hand I
don’t know where it is - probably something to do with the firewall or
network device configuration

Alan

In OpenSUSE, edit the file /etc/sysconfig/sysctl to have

IP_FORWARD="yes"
IPV6_FORWARD="yes"

ip_forward has been set since the start.

OK

It works with the following route table

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
host81-136-166- *               255.255.255.248 U     0      0        0 eth3
192.168.3.0     192.168.3.2     255.255.255.0   UG    0      0        0 eth1
192.168.3.0     *               255.255.255.0   U     0      0        0 eth1
192.168.2.0     gateway         255.255.255.0   UG    0      0        0 eth2
192.168.2.0     *               255.255.255.0   U     0      0        0 eth2
link-local      *               255.255.0.0     U     0      0        0 eth1
loopback        *               255.0.0.0       U     0      0        0 lo
default         host81-136-166- 0.0.0.0         UG    0      0        0 eth3

The above was done by deleting the routes added by YAST, and then the following commands

route add -net 192.168.2.0 netmask 255.255.255.0 gw 192.168.2.2 dev eth2
route add -net 192.168.3.0 netmask 255.255.255.0 gw 192.168.3.2 dev eth1

I’m guessing that YAST needs some more info in order to recreate the table above, but what, I don’t know.

Getting further anyways.

Cheers.