Router Configuration

Hi, I’ve just spent the entire night trying to get my computer to share Internet with my laptop.

I have DSL Internet with the modem configured to bridge mode.
On the openSUSE server I have two NIC’s. When setting up the DSL (pppoe) it created a dsl0 which is using the NIC eth0.

So now I have dsl0, eth0, and eth1

I configured eth1 for DHCP server.

When I connect with my laptop using DHCP it gets an IP address just fine. However I can’t access the Internet.

I think my problem is in the Kernel IP Routing Table. Here is the output from /sbin/route -n


Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
76.235.175.254  0.0.0.0         255.255.255.255 UH    0      0        0 dsl0
10.30.60.0      0.0.0.0         255.255.255.0   U     0      0        0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 eth1
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         0.0.0.0         0.0.0.0         U     0      0        0 dsl0

dsl0 obtains IP from ISP
eth0 is set to DHCP although that confuses me because how can the same NIC have two IP Addresses?
eth1 static IP 10.30.60.1

Just a little extra info:

I can connect to the internet with the Server just not other computers in the LAN.

I’m using yast to configure the network not network manager.

You have a public IP on the dsl0 interface and private IPs for the internal network. So, you need to set up IP masquerading using iptables.

Thanks I’m reading the openSUSE manual on masquerading now.

One issue I have is that a lot of guides on setting up masquerading tell me to use my public IP as the default gateway. However my WAN IP is not static so there must be another way.

You don’t need to give the public IP as the default GW. You should give the private IP on that machine as the default GW for others (set it up that way in the DHCP configuration so that others will get it).