problems with manual setup of ip-forwarding

Folks,

I have two laptops; one of them, orion, is connected to the internet (interface ppp0), the other one, rigel, is connected to orion (both using interface eth0). Orion is running SuSE 11.0, rigel runs SuSE 10.2.

In /etc/hosts on both machines:

192.168.1.1 rigel
192.168.1.2 orion

On orion I do

modprobe ipt_MASQUERADE
ifconfig eth0 orion
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -A FORWARD -t filter -i eth0 -s 192.168.1.0 -j ACCEPT
iptables -A POSTROUTING -t nat -s 192.168.1.0 -j MASQUERADE

On rigel I do

ifconfig eth0 rigel
route add default gw 192.168.1.0

Theoretically, this should be sufficient to make it work
(according to various guides which can be found in the
internet). However, it doesn’t work for me.

I can do

ping rigel
ping orion

on both hosts, and I can successfully ping into the internet
from orion, but ping into the internet from rigel fails. I
get

> ping 131.130.1.2
From 127.0.0.1: … Destination Host Unreachable

Here the relevant info.

ifconfig on orion:

eth0 Link encap:Ethernet HWaddr 00:16:36:DC:88:2E
inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::216:36ff:fedc:882e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

ppp0 Link encap:Point-to-Point Protocol
inet addr:77.25.44.64 P-t-P:10.64.64.64 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1

route on orion:

10.64.64.64 * 255.255.255.255 UH 0 0 0 ppp0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default * 0.0.0.0 U 0 0 0 ppp0

ifconfig on rigel:

eth0 Link encap:Ethernet HWaddr 00:15:C5:0E:44:82
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::215:c5ff:fe0e:4482/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

route on rigel:

192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default 192.168.1.254 0.0.0.0 UG 0 0 0 eth0

Please help!

Werner

On rigel, do:

route add default gw 192.168.1.2

instead of:

route add default gw 192.168.1.0

Looks like you are pointing your default route to a network instead of an IP.

No effect, unfortunately. Now,

ping 131.130.1.2

on rigel no longer produces any message.