Results 1 to 9 of 9

Thread: Problem sharing internet connection

  1. #1
    maximus57 NNTP User

    Unhappy 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 192.168.0.1 subnet 255.255.255.0. 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 192.168.0.1 (it is set up as a bridge so I can share internet from whatever source forces its IP to 192.168.0.1). 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?

  2. #2
    Join Date
    Oct 2008
    Location
    North Wales, UK
    Posts
    1,114

    Default Re: Problem sharing internet connection

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

  3. #3
    maximus57 NNTP User

    Default Re: Problem sharing internet connection

    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?

  4. #4
    Join Date
    Oct 2008
    Location
    North Wales, UK
    Posts
    1,114

    Default Re: Problem sharing internet connection

    Quote Originally Posted by maximus57 View Post
    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.
    You're in the right place to enter the dns and router settings.
    Yast2>Network Devices>Network Settings.

    Quote Originally Posted by maximus57 View Post
    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?
    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.

  5. #5
    maximus57 NNTP User

    Default Re: Problem sharing internet connection

    Quote Originally Posted by whych View Post
    You're in the right place to enter the dns and router settings.
    Yast2>Network Devices>Network Settings.
    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 192.168.0.2 (the router ip). With windows ICS enabled on one computer, it connects to the router with a static ip of 192.168.0.1, 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
    Code:
    Windows IP Configuration
    
    Ethernet adapter Wireless Network Connection:
            Connection-specific DNS Suffix  . : 
            IP Address. . . . . . . . . . . . : 192.168.0.1
            Subnet Mask . . . . . . . . . . . : 255.255.255.0
            Default Gateway . . . . . . . . . : 
    
    PPP adapter Mobile Broadband EVDO - Franklin (CDU680DOrA):
            Connection-specific DNS Suffix  . :
            IP Address. . . . . . . . . . . . : 66.yyy.yy.yy
            Subnet Mask . . . . . . . . . . . : 255.255.255.255
            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
              0.0.0.0          0.0.0.0     66.yyy.yy.yy    66.yyy.yy.yy	  1
         66.yyy.yy.yy  255.255.255.255        127.0.0.1       127.0.0.1	  50
        66.yyy.zz.zzz  255.255.255.255     66.yyy.yy.yy    66.yyy.yy.yy	  1
       66.255.255.255  255.255.255.255     66.yyy.yy.yy    66.yyy.yy.yy	  50
            127.0.0.0        255.0.0.0        127.0.0.1       127.0.0.1	  1
          192.168.0.0    255.255.255.0      192.168.0.1     192.168.0.1	  25
          192.168.0.1  255.255.255.255        127.0.0.1       127.0.0.1	  25
        192.168.0.255  255.255.255.255      192.168.0.1     192.168.0.1	  25
            224.0.0.0        240.0.0.0      192.168.0.1     192.168.0.1	  25
            224.0.0.0        240.0.0.0     66.yyy.yy.yy    66.yyy.yy.yy	  1
      255.255.255.255  255.255.255.255     66.yyy.yy.yy               2	  1
      255.255.255.255  255.255.255.255     66.yyy.yy.yy    66.yyy.yy.yy	  1
      255.255.255.255  255.255.255.255      192.168.0.1     192.168.0.1	  1
    Default Gateway:      66.yyy.yy.yy
    ===========================================================================
    Persistent Routes:
      None
    From the linux box when it is trying to share the internet
    Code:
    modem0    Link encap:Point-to-Point Protocol  
              inet addr:66.yyy.yy.yy  P-t-P:66.yyy.zz.zzz  Mask:255.255.255.255
              UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
              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:192.168.0.1  Bcast:192.168.0.255  Mask:255.255.255.0
              inet6 addr: fe80::21a:70ff:fea4:9450/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              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   0.0.0.0         255.255.255.255 UH    0      0        0 modem0
    192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0
    169.254.0.0     0.0.0.0         255.255.0.0     U     0      0        0 wlan0
    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 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.

  6. #6
    maximus57 NNTP User

    Default Re: Problem sharing internet connection

    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.

  7. #7
    Join Date
    Oct 2008
    Location
    North Wales, UK
    Posts
    1,114

    Default Re: Problem sharing internet connection

    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. (smoothwall.org)
    Mine is running on an old p2 with 512meg RAM and a 4gb flash card for a hard drive.

  8. #8
    maximus57 NNTP User

    Default Re: Problem sharing internet connection

    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.

  9. #9
    Join Date
    Oct 2008
    Location
    North Wales, UK
    Posts
    1,114

    Default Re: Problem sharing internet connection

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •