[CS-FSLUG] Setting Up Connection Sharing - SUSE 10.0

Stephen J. McCracken smccracken at hcjb.org.ec
Mon Feb 27 12:28:24 CST 2006


Don Parris wrote:
> I have never setup Internet connection sharing before.  RoadRunner
> allows me to share a connection between 4 boxes.  My SUSE 10.0 box is
> the one attached to the 'Net via cable modem.  eth0 obtains its IP
> address via DHCP from the cable modem.  eth1 has a static IP and
> provides DHCP service for the internal LAN.
> 
> eth0 = 71.68.104.83
> eth1 = 192.168.2.3
> 
> In Yast, I setup both NICs to allow IP forwarding.  

Ok, up to here, as far as I can see.

> I have not set the
> default route, although I have the default gateway as 255.255.255.0. 

Huh?  Why?  The ISP DHCP should set the gateway for you (and this looks
 like a *netmask*, not a gateway address).

> The destination is showing as 255.255.240.0, although I do not know

What destination?  (and another netmask, not an IP address).

> why.  The internal hosts definitely connect to the SUSE box and obtain
> their IP addresses via DHCP.  However, they don't have a way to get
> beyond the SUSE box.  Can someone help me understand what I am
> missing?

You're on the right track.  I would guess it's your gateway setup.  I'm
not familiar with SUSE, but make sure:

1. Your ip forwarding is on.
    (echo 1 > /proc/sys/net/ipv4/ip_forward)
2. Make sure your network configuration is ok for both NICs.
    (ifconfig -a shows you the configuration)
3. Make sure your firewall is allowing forwarding
    (iptables -L FORWARD to list the forward chain)
4. Set up either NAT or Masquerading on your firewall

Check out these links:

http://www.novell.com/coolsolutions/feature/11505.html

http://www.linux-magazine.com/issue/37/Network_Gateways.pdf

> 
> Do I need to create a 2nd IP address on the internal (or the external)
> NIC?

You shouldn't

>  IOW, how do I set the default route so that my connection can
> actually be shared?  

If you use DHCP on both sides, it shouldn't be necessary.  Your ISP
should tell your SUSE box it's gateway and the DHCP on your SUSE box
should tell all clients their gateway (the SUSE box itself).

Hope this helps,

sjm




More information about the Christiansource mailing list