1

I have a Pi connected to my computer (running linux) through ethernet. I need this configuration for other purposes as the raspberry collects data from sensors and the data is sent through ethernet to the pc. The problem I am facing is that I need internet connection on my raspberry pi, and I would like to be able to connect to the internet using the ethernet cable. I have managed to do so on Windows, checking the "Sharing" tab under "Internet Connection Sharing", but now I need to do the same in Linux and I haven't found a way to do so. Can someone help me? Thanks in advance.

Ps: my pc does not have a wifi option as it has no wifi interface and is connected to the internet using another ethernet cable.

user68186
  • 494
  • 6
  • 15
Javier
  • 11
  • 3
  • You can use any kind of *ftp* eg, *freeFTP* to transfer files to/from PC Windows OS and Rpi OS through Ethernet (Cat5 cable, eg). Even my EditPlus text editor has ftp features. – tlfong01 May 19 '22 at 11:20
  • Connect to Pi to your router. – Milliways May 19 '22 at 22:40
  • This is not a Pi question, it is a general Linux question. You want your computer to act as a router, possibly with DHCP server. Search for "configuring linux as a router" or something like that. – Ljm Dullaart Jun 02 '22 at 20:12
  • After researching for some time I reached the conclusion that there is no way the raspberry can access the internet obtaining shared connection from the computer through one ethernet cable. I did a workaround that got me the same result though: using a switch. The pc and the raspberry were connected to the switch with an ethernet cable each, and the switch had access to the internet through another ethernet cable. That allowed both devices having internet connection whilst being able to communicate with each other. – Javier Jun 03 '22 at 08:41
  • @Javier You should convert your last comment to an answer. See the site's help pages for how to answer your own question. This will help others. – user68186 Jun 09 '22 at 19:46
  • I do this a lot, I use a switch, they are not very expensive. It is connected to the router and the other machines connect to the ports. If you connect machine to machine you need a crossover cable. – Gil Jun 14 '22 at 00:56

1 Answers1

0

After researching for some time I reached the conclusion that there is no way the raspberry can access the internet obtaining shared connection from the computer through one ethernet cable. I did a workaround that got me the same result though: using a switch. The pc and the raspberry were connected to the switch with an ethernet cable each, and the switch had access to the internet through another ethernet cable. That allowed both devices having internet connection whilst being able to communicate with each other.

Javier
  • 11
  • 3