Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Sharing Internet from a Win 10 machine via ethernet

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
aivan
Posts: 6
Joined: 2017-11-15 16:59

Sharing Internet from a Win 10 machine via ethernet

#1 Post by aivan »

Hi!

First post, so you can take for granted I'm a complete noob to Debian and Linux in general. Really small knowledge about it around here.
I've setup a box with dual boot Win7/Debian.
My main computer is a Win10 machine mostly used for gaming and streaming Netflix via SteamLink to my living room TV. Its internet connection is shared.
I only have one ethernet cable (and Internet connection) at this room and it's plugged to the Win10 machine. This machine has two ethernet ports.
I've connected the Win/Deb machine to the Win10 machine using the free ethernet connection.
While in Windows 7 I can get internet connection from the Win10 machine and I'm trying to do the same in Debian.
I've googled and found some solutions that I can't make to work.
The main ethernet connection on the Win10 machine is in the 192.168.0.X subnet while the connected debian machine, and the second network adapter in Win10, are in the 192.168.137.X subnet.
I can ping from Deb to Win10 and viceversa. So they are connected. But in Win10 the connection says Network not identified.
What, and luckily how, should I do to have Internet connection in Debian from the Win10 machine?

Thanks in advance!

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Sharing Internet from a Win 10 machine via ethernet

#2 Post by Bulkley »

An ignorant question from my end. Do you need Samba?
Samba is the standard Windows interoperability suite of programs for Linux and Unix.
It's in Debian repositories.

aivan
Posts: 6
Joined: 2017-11-15 16:59

Re: Sharing Internet from a Win 10 machine via ethernet

#3 Post by aivan »

Hi!
Thanks for your time.
No, I don’t think I need Samba for now.
If I need it I’ll see what to do later. It’s good to have things on queue while learning. Hahaha

shep
Posts: 423
Joined: 2011-03-15 15:22

Re: Sharing Internet from a Win 10 machine via ethernet

#4 Post by shep »

One way would be to read about routing tables. Essentially you need to tell the Debian machine that the route to the internet goes through the Win10 machine.

Another way would be to have the Debian machine on the same network as the Win10 machine = bridging.

Bulkley
Posts: 6383
Joined: 2006-02-11 18:35
Has thanked: 2 times
Been thanked: 39 times

Re: Sharing Internet from a Win 10 machine via ethernet

#5 Post by Bulkley »

I used to go through this stuff many years ago but don't anymore. A wifi router enables every device to connect individually, not to mention that it eliminates a lot of wire.

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1400
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 79 times
Been thanked: 175 times

Re: Sharing Internet from a Win 10 machine via ethernet

#6 Post by steve_v »

So the windoze machine has "internet connection sharing" enabled, and you're trying to connect through that, yes?
I have heard of that feature, but I don't do windoze so I have to assume it's some hind of ip forwarding / routing.
Is the windoze box giving out DCHP leases on that second NIC? if so, setting the Debian machine to acquire an IP via DHCP should be sufficient - the lease will include the relevant routing information.
Otherwise, you'll need to set up the correct routing table entrie(s). Something like (IIRC) 'route add default gw <ip of windoze machine>' might do for testing, then read this to add it permanently.
I have my doubts about the security of such a setup though, your configuration kind of implies no router / firewall between win10 and the internet... And using windoze as a router gives me the creeps.
Much simpler to install a dedicated router, all-in-one router/firewall/switch/wireless boxes are cheap.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

aivan
Posts: 6
Joined: 2017-11-15 16:59

Re: Sharing Internet from a Win 10 machine via ethernet

#7 Post by aivan »

Bulkley wrote:I used to go through this stuff many years ago but don't anymore. A wifi router enables every device to connect individually, not to mention that it eliminates a lot of wire.
That’s my final idea, but I need a connection in order to make the WiFi dongle work.
I could simply plug the cable that goes to the internet router, get the files to make the WiFi work and then switch back. But I thought it could be a good exercise to get connection from the win10 machine.

Thanks anyway for your answer

aivan
Posts: 6
Joined: 2017-11-15 16:59

Re: Sharing Internet from a Win 10 machine via ethernet

#8 Post by aivan »

steve_v wrote:So the windoze machine has "internet connection sharing" enabled, and you're trying to connect through that, yes?
I have heard of that feature, but I don't do windoze so I have to assume it's some hind of ip forwarding / routing.
Is the windoze box giving out DCHP leases on that second NIC? if so, setting the Debian machine to acquire an IP via DHCP should be sufficient - the lease will include the relevant routing information.
Otherwise, you'll need to set up the correct routing table entrie(s). Something like (IIRC) 'route add default gw <ip of windoze machine>' might do for testing, then read this to add it permanently.
I have my doubts about the security of such a setup though, your configuration kind of implies no router / firewall between win10 and the internet... And using windoze as a router gives me the creeps.
Much simpler to install a dedicated router, all-in-one router/firewall/switch/wireless boxes are cheap.
I see you did not understood the setup.
Win10 machine cable is connected to a switch that is connected to a router connected to the internet. And in the second Ethernet plug I connect the Debian machine.
Anyway thanks for your time and tips!

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: Sharing Internet from a Win 10 machine via ethernet

#9 Post by p.H »

Bulkley wrote:An ignorant question from my end.
Obviously. Samba has nothing to do with internet connection sharing but with file sharing.
shep wrote:Another way would be to have the Debian machine on the same network as the Win10 machine = bridging.
The Debian machine is directly connected to the Windows machine, so they are already in the same network. But a different network from the one at the other side of the Windows machine, connected to the internet router. Bridging on the Windows machine would put the Debian machine in the same network as the internet router.
aivan wrote:I see you did not understood the setup.
AFAICS, steve_v perfectly understood the setup and suggested a valid solution. How did you configure networking on the Debian machine ?
If you did a static setup, donc forget to set the default gateway and DNS addresses.

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1400
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 79 times
Been thanked: 175 times

Re: Sharing Internet from a Win 10 machine via ethernet

#10 Post by steve_v »

aivan wrote:I see you did not understood the setup.
Win10 machine cable is connected to a switch that is connected to a router connected to the internet.
How thoughtful of you, carefully explaining these aspects of your network configuration, before I went to the trouble of typing all that. :roll:
Disregard the bit about no upstream router then. The rest stands: What's your routing table look like, and how is the Debian box getting it's IP?
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

aivan
Posts: 6
Joined: 2017-11-15 16:59

Re: Sharing Internet from a Win 10 machine via ethernet

#11 Post by aivan »

steve_v wrote:
aivan wrote:I see you did not understood the setup.
Win10 machine cable is connected to a switch that is connected to a router connected to the internet.
How thoughtful of you, carefully explaining these aspects of your network configuration, before I went to the trouble of typing all that. :roll:
Disregard the bit about no upstream router then. The rest stands: What's your routing table look like, and how is the Debian box getting it's IP?
Sorry if I sounded rude man.
I know the rest of your post still applies.
I’ll let you know if I’m capable of doing any good with all your advises.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Sharing Internet from a Win 10 machine via ethernet

#12 Post by debiman »

aivan wrote:Win10 machine cable is connected to a switch that is connected to a router connected to the internet. And in the second Ethernet plug I connect the Debian machine.
so there's a router, and both machines are already connected to the internet and there is no problem!
or what?

at first i thought you need the win10 machine to connect the other machine to the internet, but that cannot be.
or if it can, it is well outside the scope of this forum (murky microsoft stuff).

how exactly do you get internet into your home? be precise.

aivan
Posts: 6
Joined: 2017-11-15 16:59

Re: Sharing Internet from a Win 10 machine via ethernet

#13 Post by aivan »

debiman wrote:
aivan wrote:Win10 machine cable is connected to a switch that is connected to a router connected to the internet. And in the second Ethernet plug I connect the Debian machine.
so there's a router, and both machines are already connected to the internet and there is no problem!
or what?

at first i thought you need the win10 machine to connect the other machine to the internet, but that cannot be.
or if it can, it is well outside the scope of this forum (murky microsoft stuff).

how exactly do you get internet into your home? be precise.
Picture a room with only one Ethernet plug. This plug has internet on it. I want to plug it to the win10 machine and get connection in the Debian box through the win10 machine. I believe it can be done.

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1400
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 79 times
Been thanked: 175 times

Re: Sharing Internet from a Win 10 machine via ethernet

#14 Post by steve_v »

aivan wrote:I want to plug it to the win10 machine and get connection in the Debian box through the win10 machine. I believe it can be done.
Well, I certainly know how to do it the other way around, with ip-forwarding on the on the Debian machine... But like debiman, Microsoft stuff is murky to me. It almost certainly can be done, but you're not providing the required information.
If you actually want help getting a connection through this murky Microsoft stuff, try answering the questions that have been asked: How is Debian getting an IP, and how is your routing and DNS set up.
Additional: What does a traceroute to an internet-side IP say? 8.8.8.8 (google DNS) is usually a good target.

We can certainly help you get the Debian box configured, but not without knowing how it is set up currently, or how the thing it's connecting to is configured. Saying "it's connecting to Windows 10 internet sharing" means next-to-nothing to me, as I don't use Windows.

Then again, the standard solution when one has a singe ethernet port and multiple machines is to get a switch. Switches are cheap, and require no shagging around to configure.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: Sharing Internet from a Win 10 machine via ethernet

#15 Post by debiman »

aivan wrote:Picture a room with only one Ethernet plug. This plug has internet on it. I want to plug it to the win10 machine and get connection in the Debian box through the win10 machine. I believe it can be done.
so where is the switch and the router you were talking about? are you in control of these things?

if, otoh, all that is really the case then the solution to your problem lies in your win10 machine.

or you get some additional device that works as a sort of router, stick that into the ethernet port, and plug both machines into that router. (edit: according to steve_v's post, these switches seem to exist and aren't any trouble at all)

but that sounds like a lot of hassle and i have the vague feeling that there's a much simpler solution which we cannot offer because you're leaving out some vital pieces of information.

steve_v
df -h | grep > 20TiB
df -h | grep > 20TiB
Posts: 1400
Joined: 2012-10-06 05:31
Location: /dev/chair
Has thanked: 79 times
Been thanked: 175 times

Re: Sharing Internet from a Win 10 machine via ethernet

#16 Post by steve_v »

debiman wrote:according to steve_v's post, these switches seem to exist and aren't any trouble at all
I'm talking about a garden variety switch, cascading switches is not a problem so long as you don't mind the bandwidth hit (which you suffer anyway with this "connection sharing" malarkey).
One can pick up a 4 or 5 port switch for like, $15. That's less than the worth of the time wasted on this so far.
Once is happenstance. Twice is coincidence. Three times is enemy action. Four times is Official GNOME Policy.

Post Reply