I have broadband, and my ISP set up my windows PC for the internet via a Ethernet cable. But my other PC (which runs Ubuntu Linux) can't now connect to the Internet. My ISP suggests using a Wifi router to connect both PCs to the Internet, but I don't want to purchase a router, as I already have a hub. But using a hub, I've been told I can't share that Internet connection.

My ISP says that I can share the Internet using a Wifi router, not the hub. Is there any way to share internet using this hub?

  • you need a router. it doesn't need to be wifi, but it does need to be a router. you can add a network card to the windows PC and configure ICS as David has suggested, and that will configure it to act as a router. you could then plug the hub into the second network card, and use it to share access to multiple PCs. – Frank Thomas Oct 12 '15 at 21:10
  • 2
    Do you really have a hub en.wikipedia.org/wiki/Ethernet_hub ? What is the make and model? - Routers without WiFi can look identical to a hub, and they will work, unless the Linux machine is WiFi only. Will that Linux machine connect by Ethernet? - Hubs will not perform NAT, the Network Address Translation, which lets all your PCs share the single IP address assigned to you by your ISP. That's why a router, with or without WiFi, would solve your problem. – K7AAY Oct 12 '15 at 21:24
  • 1
    @K7AAY, its a good idea to check, but I would point out that a whether it is a hub or a switch will have no impact on the problem domain. if it is a router, then OP is in luck though. – Frank Thomas Oct 12 '15 at 21:27

Is there any way to share internet using hub?

Short answer:


Long answer:

You can either:

  • Use a router as advised by your ISP, or

  • Set up one PC with some kind of Internet Connection Sharing (ICS) software to act as a software router.


The very first consideration is: how much is your time worth? Routers are cheap; you can find one at a thrift store for $20 or less. Unless you're working a minimum wage job (or are unemployed) and have no money available, the procedures below are not worth your time. (And even then, spending a couple hours at a temp labour agency is probably more worthwhile, if it takes you longer than 2 hours to get this working.)

The below describes an overview of what needs to be done. Specifics, such as, "how to assign a secondary IP address in Ubuntu" and "how to set up NAT routing" are separate questions.

If you only need one computer online at a time: Configure the Linux computer to fake the MAC address on its network card, so that it's the same as the Windows computer. (This won't work if both computers are on, though.)

If you need both computers online at the same time:

You'll need one computer to be a router for the other computer. This probably can't be done easily in Windows (yes, windows has Internet Connection Sharing, but it operates on the assumption that you have two network cards; I'm assuming you don't), but you can do it in Linux.

Step 1: get your ISP to recognize your Linux computer as the one that's configured for internet access. The easiest way is to connect your Linux computer to the Internet port, then call your ISP and ask them to "flush their MAC address cache" for your connection -- let them know you're asking them to do that because you changed your Internet-facing computer.

If your ISP can't/won't let you change which computer is the "online" one, you have a couple options:

  • if your network cards are movable (that is, both your network cards are separate cards that you can move between computers, not soldered onto the motherboard), swap the network cards of the Windows and Linux computers.

  • if your network cards are soldered onto the motherboard, see if Windows will let you change the MAC address on the network card: if so, swap MAC addresses between the Linux and Windows computers.

  • if Windows will not let you change MAC addresses, change which OS is on which computer -- that is, swap the hard drives, then reinstall/fix Windows on the Windows disk (Linux will be fine moving between computers, but Windows will usually refuse to boot).

Now you have Linux able to connect to the Internet, and Windows not.

Step 2: assign IP addresses

Connect both computers to the hub, and connect the hub to your Internet port provided by your ISP.

Your Linux computer will have an IP address assigned by your ISP, and should be able to get online via the hub.

Now give your Linux computer a second IP address as well, in the 192.168. range. For example,

Give your Windows computer a manually configured IP address on the same range, e.g., and set its default gateway address to be the 192.168 address you gave the Linux computer, i.e. Set its DNS server addresses to the same ones the Linux computer is using, i.e. the ones provided by your ISP.

Step 3: set up NAT routing

On the Linux box, configure NAT routing between the 192.168. subnet, and your IP address assigned by the ISP. The 192.168 range is your internal subnet, and the IP address assigned by the ISP is the public/"outside" IP.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.