I do not have internet except by using my mobile phone. Last week I bought my first raspberry pi its a 4b and is really amazing. I'm an experienced programmer but a networking failure. I have linux & windows machines so I wanted to use the raspberry pi 4b as a NAS which meant getting an ubiquity edgerouter x with 5 RJ45 ports and no usb ports and no wireless. I hoped to run a home LAN without internet connectivity but it seems I need internet for various reasons. Connecting my samsung J6+ to the raspberry pi wirelessly and by USB works perfectly. I know that as a wireless hot spot the phone lets me connect multiple computers to the internet but in USB tethered mode it only works with one machine - I believe this enables a phone with a static address to use a phone supplied dhcp server to connect to 1 or many depending upon how connected. I do need the phone to go through the router.
Reading in many places (including here) I realised that I should repurpose my rasperry pi to being a bridge between phone and router ie set phone on USB tethering; connect phone to the pi; run ethernet cable from pi to router eth0 ie wan. From a good article here I have set up the pi and installed a dhcp server, told the pi to use my static ip address on my phone which is of the form 10.123.12.123/24 and I believe I effectively set up virtual eth0 and eth1 on my pi. It all seemed reasonable but I'm not sure if all is running correctly at this stage - I do not really know how and what sort of output I could get to ensure it is good so far.
Anyway assuming it is good I then went onto my router and turned of dhcp on my router, set eth0 as a static address exactly the same as my phone. but I'm required to set up a gate way and dns address which seems to be contrary to the answer I was trying to impliment. Looking at my pi changes it seems to setting up a single static address on all 3 components and using port forwarding to pass information to and from the static ipaddress about gateway & dns. I imagined the dhcp server on the pi would manage everything and the router would thank the pi and go about its business of connecting to clients.
- Tell me if my understanding is right or wrong,
- give me a clue about the router settings that are required (eg gateway, DNS) and
- confirm that the ethernet cable should go into the wan port (eth0) of my router.
In programming I know how to put in debug code to see how it is running but linking bits of hardware together is all a bit magical.
I think I'll be getting an internet connection within the next few months but I think this is a good first project for me. And I need it now - which means getting another pi for my NAS to run owncloud and OMV. By the way, instead of scrapping my augmented noobs flash card is there a way to rollback the changes I made. Any hints or tips would be appreciated - the more I have to read, contrast and compare the greater becomes my understanding.