Problem sharing internet connection

I am trying to share a USB modem through the wireless card in a computer (opensuse 11.1). I set wlan0 with a static ip of subnet Turned on IP forwarding. In the firewall set modem0 to external and wlan0 to internal and turned on masquerading. From reading the how-to this should be all I have to do.

On the receiving end of the wireless is a router set up for the gateway and DNS to (it is set up as a bridge so I can share internet from whatever source forces its IP to This setup works with windows ICS with no problems with 3 different computers.

I start the modem and wireless with kinternet. I can get internet though the modem fine. The wireless is connected to the router. From the computer trying to get the internet through the router I can successfully ping to the outside world. But it won’t resolve addresses at all. I can ping but nothing else. It is so close but yet so far. Any ideas?

Its a dns problem. Try manually setting the dns server address in the linux box to or the isp’s dns server address.

While I consider myself a moderate power user in windows, I am a noob to linux. There was a spot in yast network settings that had spots for name servers. I tried it there with no luck. I don’t think that is the right spot, I could use some help finding the right spot. Also, how do you find what the DNS servers are in linux? I had to go from memory from my windows box.

I did do a different test. I put the isp dns server in the router and it then passed the internet though it. It is not a proper fix for the problem though. How do I get my modem interface to pass dns to the wireless interface?

You’re in the right place to enter the dns and router settings.
Yast2>Network Devices>Network Settings.

OK. So your routing and gateway are set up right. In your case, the gateway is the linux box ipaddress.
Since I assume you don’t have a dhcp server to dish out addresses, you are manually setting ipaddresses.
To discover your network settings from the gatway box, open a terminal and type:
sudo /sbin/ifconfig
Enter the route password and it will give you all the network settings.
The clients on the other side of the linux gateway boxwon’t get an address for the modem because it’s on a different network, so you have to manually enter the ipaddress of the nameserver.
Unless you need internal nameservers, the isp’s nameserver is fine.

I might be in the right place, but getting into advanced routing is over my head. I am used to windows doing it for me.

OK. So your routing and gateway are set up right. In your case, the gateway is the linux box ipaddress.

I am not so sure that the routing and gateway are set up right. It looks a lot different on my windows box when it is working.

Since I assume you don’t have a dhcp server to dish out addresses, you are manually setting ipaddresses.

The router DOES have dhcp enabled. It assigns clients ip address, and clients end up with a gateway and dns of (the router ip). With windows ICS enabled on one computer, it connects to the router with a static ip of, and the router shares that to any other clients connected. And yes that means that both the computer with ics and the router both have dhcp turned on but the router allways wins and has never been a problem.

Below is info from both boxes.
66.yyy.yy.yy = my ip address
66.yyy.zz.zzz = ip server

From the windows box when it is successfully sharing the interent

Windows IP Configuration

Ethernet adapter Wireless Network Connection:
        Connection-specific DNS Suffix  . : 
        IP Address. . . . . . . . . . . . :
        Subnet Mask . . . . . . . . . . . :
        Default Gateway . . . . . . . . . : 

PPP adapter Mobile Broadband EVDO - Franklin (CDU680DOrA):
        Connection-specific DNS Suffix  . :
        IP Address. . . . . . . . . . . . : 66.yyy.yy.yy
        Subnet Mask . . . . . . . . . . . :
        Default Gateway . . . . . . . . . : 66.yyy.yy.yy

Interface List
0x1 ........................... MS TCP Loopback interface
0x2 ...xx xx xx xx xx xx ...... Realtek RTL8139/810x Family Fast Ethernet NIC - Packet Scheduler Miniport
0x3 ...xx xx xx xx xx xx ...... Atheros AR5004G Wireless Network Adapter - Packet Scheduler Miniport
0x20005 ...xx xx xx xx x xx ...... WAN (PPP/SLIP) Interface
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
     66.yyy.yy.yy    66.yyy.yy.yy	  1
     66.yyy.yy.yy	  50
    66.yyy.zz.zzz     66.yyy.yy.yy    66.yyy.yy.yy	  1     66.yyy.yy.yy    66.yyy.yy.yy	  50	  1	  25	  25	  25	  25     66.yyy.yy.yy    66.yyy.yy.yy	  1     66.yyy.yy.yy               2	  1     66.yyy.yy.yy    66.yyy.yy.yy	  1	  1
Default Gateway:      66.yyy.yy.yy
Persistent Routes:

From the linux box when it is trying to share the internet

modem0    Link encap:Point-to-Point Protocol  
          inet addr:66.yyy.yy.yy  P-t-P:66.yyy.zz.zzz  Mask:
          RX packets:3 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:3 
          RX bytes:66 (66.0 b)  TX bytes:87 (87.0 b)

wlan0     Link encap:Ethernet  HWaddr xx:xx:xx:xx:xx:xx 
          inet addr:  Bcast:  Mask:
          inet6 addr: fe80::21a:70ff:fea4:9450/64 Scope:Link
          RX packets:19 errors:0 dropped:0 overruns:0 frame:0
          TX packets:22 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1349 (1.3 Kb)  TX bytes:4005 (3.9 Kb)

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
66.yyy.zz.zzz UH    0      0        0 modem0   U     0      0        0 wlan0     U     0      0        0 wlan0       U     0      0        0 lo         U     0      0        0 modem0

By the way, how do you edit a post? I didn’t see an edit button when trying to edit my last post. Hopefully I get this post the way I want it.

I tried playing around with the routing table, but like I said I don’t know what I am doing so didn’t get anywhere. Anybody have any ideas? A big part of the purpose of trying out linux was to have a box that would unconditionally share an internet connection, since I have some issues with windows not port forwarding correctly. It is looking like I am stuck with windows.

If you have an old pc lying around you should rather look at using a dedicated firewall/router like smoothwall or pfsense or some such linux based distro. All it does is keep your internet connection up and provide firewalling and filtering - nothing else. Works like a dream for linux or windows networks, blocks everything and is happy with an old pentium pc. Just get a cheap usb pci card for it because the older pcs didn’t have the power handling for the modem. (
Mine is running on an old p2 with 512meg RAM and a 4gb flash card for a hard drive.

Thanks, I didn’t realize something existed like that. I will check those out, they would be what I would be looking for, as long as they will work with the usb modem.

Have a look at smoothwall then. They used to have a HCL that listed supported usbs modems. In some cases (in the early days) you had to install the driver from floppy for it to work.
I believe a firewall is just that. It’s something that blocks hackers and if it’s taken down, you can rebuild it. If the firewall is also a workstation/server, it means you could lose data and personal info.