Internet Connection Sharing - USB 3G Wireless Modem to External Router via Ethernet Port

mtbvfr
  10 years ago
  1

Internet Connection Sharing - USB 3G Wireless Modem to External Router via Ethernet Port

Hi Everyone,

As I publish this tutorial, I am still using Mint 16 KDE from a Live USB Flash Drive.

After unnecessarily wasting many hours searching for and finding "solutions" that mostly "led me up the garden path" (English Colloquialism) I found the following page that hinted the solution for my scenario may be much simpler than what I had read on a lot of the other pages.

https://help.ubuntu.com/community/Internet/ConnectionSharing

However, even this page seems to have some overly convoluted routines to follow.

With Windows, you configure the device you want to share the Internet Connection FROM and during that process you select the device TO which you want to also have access to the Internet. To me, that makes more logical sense and is more intuitive. Therefore, I think it should be just as easy to do the same with Linux Mint which it is if you follow my tutorial as below.

My solution is based on the following option on the above page.

GUI Method via Network Manager (Ubuntu 9.10 and up)

The Router I am using is the Netgear WNR834B v2 Router. It is configured as follows.
    
    Basic Settings
        Does Your Internet Connection Require A Login
        No

        Account Name - Probably not necessary when a Login is not required
        WNR834bV2

        Domain Name
        Leave Blank

        Internet IP Address
        Get Dynamically

        Domain Name Server
        Get Automatically

        Router MAC Address
        Use Default

    LAN Setup
        Device Name
        WNR834bV2

        LAN TCP/IP Setup
            IP Address    192.168.1.1
            Subnet Mask   255.255.255.0
            RIP Direction Both
            RIP Version   Disabled

        Use Router as DHCP Server
            Starting IP Address   192.168.1.2
            Ending IP Address     192.168.1.254


After you have started your PC and you are logged in to Mint:

Establish a connection to your ISP (Internet Service Provider)

  • In the Tray, to the right of the Taskbar, there is an Icon for Connections. The Icon may appear as one of the following images depending on the status of your hardware and OS (Operating System).

Wireless Connections Icon Mobile Broadband Disconnected Icon Mobile Broadband Connected Icon Wired Connection Not Available Or Disconnected Icon Wired Connection Available But Deactivated Icon Wired Connection Available But Not Connected Icon Wired Connection Connected Icon
 

  • Left-Click on the Connections Icon to open the Connections Pop-Up Panel that displays Active and Inactive (Previous) Connections.
  • Left-Click anywhere on the Bottom of this Pop-Up Panel which which will open another Pop-Up Panel that displays 3 Options for "Networking enabled", "Wireless enabled" and "Mobile broadband enabled" and a button for "Edit connections...".
  • Check the "Mobile broadband enabled" option.
  • Left-Click on the button for "Edit connections..." which will open the "Connection editor" application.
  • Navigate through the Connection Menu (Connection/Add/Mobile Broadband...) to add a "Mobile Broadband" connection or Click on the Add button and then the "Mobile Broadband..." option.
  • Follow the instructions for "Set up a Mobile Broadband Connection".
  • When the "Edit Connection" window appears, in the Advanced section, select the Type of connection you want to establish. Also, enter the PIN which in my case was the same as the Password. A Trial and Error approach may be required to determine if you require a PIN.
  • Click the OK button.
  • A pop-up Notification should appear to indicate that a connection to your ISP is now established. The strength of the signal, and how busy the ISP's network is, will affect how quickly the connection is established.
  • To see the New Connection in the "Connection editor", the "Connection editor" needs to be closed and re-opened.
  • Leave the "Connection editor" application open.


Connect an Ethernet cable from the Ethernet Port of your PC to the WAN (Internet) port of your Router and turn the Router on.

  • A "Wired connection" should appear under the "Previous connections" category when you click on the Connections Icon.
  • Also, you will probably begin to see Notifications indicating that the Connection is Deactivated or that the "IP configuration was unavailable". These notifications can be ignored whilst you continue with the following actions.
  • At this point, the Ethernet Port, of your PC, has not yet been assigned an IP Address.


Share the Internet Connection to the Ethernet Port.

  • The "Connection editor" application should still be open.
  • If there is no Wired category, or there is no Connection displayed under Wired category, then, Navigate through the Connection Menu ( Connection/Add/Mobile Broadband...) to add a "Wired (shared)" connection or Click on the Add button and then the "Wired (shared)" option.

Enter, or change if you wish, the "Connection name".
Select the "Wired" tab if it is not already active.
For "Restrict to device", select the Ethernet Port to which you want to share the Internet Connection.

  • If the Ethernet Port, to which you want to share the Internet Connection, is already displayed, then, Click it to select it and then Click the Edit button.

Navigate to the IPv4 tab and select "Shared to other computers" for the "Method"  option.

  • Click on the OK button.
  • The "Wired connection" will now appear twice in the "Connection editor" application and appear inactive.
  • Using "ip a" or "ifconfig" (without the quotes) in your Terminal application (Konsole in KDE), you should see that your Ethernet Port has been assigned 10.42.0.1 for its IP Address.
  • Close and re-open the "Connection editor". The "Wired connection" should now appear once and be active (Green circle to the left of the Connectoin Name).
  • If the Wired Connection is not active, open the Connections Pop-Up Panel and then click on the item for the Wired Connection to display its Connect button. Click the Connect button to activate the connection.
  • The Router should now be receiving Internet data that is being broadcasted by the Ethernet Port. If your Router also broadcasts a Wireless signal, you can confirm that it is receiving and broadcasting an Internet connection by connecting to it with a Smartphone or Tablet.

 

Although I have no documentation to confim it, the action of selecting "Shared to other computers" must activate the establishment of a connection to the Ethernet Port from whichever device is connected to the Internet if such a connection exists. Someone with better knowledge, than I, should be able to inform us more accurately. (Would the IP Tables indicate how the Network devices are connected?)

Please inform me if your experience with a similar configuration is different and I will update the tutorial as necessary.

Good luck, Michael.

Comments
MagicMint 9 years ago

I don’t see why the original Ubuntu tutorial which you refer to should be more “convoluted” than yours ;-) It performs absolutely the same task, but it also offers more explanation. It just lists more options and relates to more than one Ubuntu version…

Be happy that Ubuntu 13.10, and hence LM 16 gets along with the GUI alone. So there is no “activation of the establishment of a connection to the Ethernet port” (is that Windows slang?), it only gets automatically routed to your 3G wireless port, and its address is assigned by the OS, as any Linux box is also a router by itself :-)