routing under SuSE7.x

routing under SuSE7.x

Post by Klaus Neuman » Fri, 17 May 2002 13:24:10



Hi,
Computer A (SuSE7.2, Kernel 2.4.4) shall be router for computer B (SuSE7.3,
Kernel 2.4.10). Ping and talk works fine between the two, but no routing so
far. Computer A worked fine as router for B when I had Windows ME installed
on B. I replaced ME with SuSE7.3 recently. What did I overlook?
--
Best regards,
Klaus
 
 
 

routing under SuSE7.x

Post by Dragan Cola » Sat, 18 May 2002 01:52:59



> Hi,
> Computer A (SuSE7.2, Kernel 2.4.4) shall be router for computer B
> (SuSE7.3, Kernel 2.4.10). Ping and talk works fine between the two, but no
> routing so far. Computer A worked fine as router for B when I had Windows
> ME installed on B. I replaced ME with SuSE7.3 recently. What did I
> overlook?

You have to configure routing and masquerading explicitly.

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

#masquerading (necessary if you're using private IPs on your LAN)
iptables -t nat -A POSTROUTING -o $DSL_INTERFACE -j MASQUERADE

Place those lines in a shell script, preferably in one that gets executed
at boot time.

Check that the kernel module ip_chains is not started. Loading it is the
default behavior of SuSE 7.2 if the personal firewall is installed which is
part of the default installation.
You can't use ip_chains and ip_tables at the same time. List loaded modules
with 'lsmod', remove unwanted ones with 'rmmod $MODULE'.

I strongly suggest setting up a firewall script too. With routing/masq. you
open up your network to the world. It would be a bad idea doing it without
securing your network. Use the SuSE firewall2 (meant for routers, personal
firewall is for stand-alone boxes) or read 'man iptables' and set up your
own firewall script according your needs.

Dragan

 
 
 

routing under SuSE7.x

Post by Klaus Neuman » Tue, 21 May 2002 03:48:54




>> Hi,
>> Computer A (SuSE7.2, Kernel 2.4.4) shall be router for computer B
>> (SuSE7.3, Kernel 2.4.10). Ping and talk works fine between the two, but
>> no routing so far. Computer A worked fine as router for B when I had
>> Windows ME installed on B. I replaced ME with SuSE7.3 recently. What did
>> I overlook?

> You have to configure routing and masquerading explicitly.

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

> #masquerading (necessary if you're using private IPs on your LAN)
> iptables -t nat -A POSTROUTING -o $DSL_INTERFACE -j MASQUERADE

Since I don't have DSL, do I have to replace it with eth0? This didn't work
though. What I don't understand is, why did routing work when I had Windows
ME on computer "B"? Doesn't this show that computer "A" (router) is
configured correctly?

--
Best regards,
Klaus