Turn your RaspberryPi into a WiFi Router!
HTML-код
- Опубликовано: 24 мар 2021
- In this video we are going how to turn your RaspberryPi into a WiFi router! This allows you to take an ethernet cable and share it with multiple devices using wifi!
Note to get better performance you can also get an external wifi router using the same steps here!
Hire Me! www.spacerex.co/hire-me/
Get Early Access to Videos! / @spacerexwill
#WiFi #RaspberryPi #Tutorial
Stuff Mentioned in video:
sudo DEBIAN_FRONTEND=noninteractive apt install -y netfilter-persistent iptables-persistent
www.raspberrypi.org/documenta...
Turn a pi into a SMB NAS: • RaspberryPi Home NAS f...
Amazon Links:
RaspberryPi 4: geni.us/PLknu
Cooling Case for the Pi (Better performance): geni.us/o9I4lOK
Micro SD Card: geni.us/UBuiCTR
External Hard drive: geni.us/GoEPF
Samsung SSD: geni.us/SAaNeIZ
*These are Amazon affiliate links, which means that if you purchase a product through one of them, I will receive a small commission (at no additional cost to you). Thank you for supporting my channel! Наука
I did something like this years ago. Then RASPAP came out and it's so easy to setup but I like this cause it feels like I have more control and I understand how it works.
Great video!
This is a good, comprehensive guide. I like that you have covered all the snags such as unmasking the hostapd service, which other such videos seem to have forgotten to include.
Man your RaspberryPi 4K Tutotials series is OP!! Really helpful. Thanks a ton man.
Haha thanks man!
Thank you very much! Your great, informative walkthrough helped me set up a working AP and router on my Raspberry Pi. I honestly thank you because this made so much sense and resulted in a working Wi-Fi AP, whereas the other guide on the web resulted in me not being able to ssh into Pi anymore. That's pretty much why it took me a whole evening to set this up, I'm glad I found your guide, I only wish that I found it first. But anyway, I learned a lesson or two while messing with this. Thanks again!
Thanks! I've been looking for a travel router/hotspot. This way I might even be able to firewall in front of my laptop. Hotel Wi-Fi is so spotty, but most still have ethernet ports in rooms.
Thank you for making this video! I tried to do it earlier and run into trouble because of my limited knowledge of Linux. Now I will try to do it again.
Great to hear!
This is exactly what I've been looking for, but I have a few questions that I'm not sure I can answer myself.
1. Would it be possible to use this as a sort of repeater? For example using a wifi dongle to add another wifi interface, and connecting that to an existing wifi network using that instead of eth0 for internet connection.
2. What about a hotspot using mobile data through a usb sim adapter?
3. Assuming the above is possible could you dynamically switch between Ethernet, Wireless, and mobile based on what was available?
4. Could you use vlans on the eth0 interface to allow for a wired LAN network and a wired WAN using a vlan aware switch?
It worked. But many a times I have restart the pi in order to connect a new device.
Still it works. 👍👍👍
Not completely what I looked for but it was a perfect base for it. In my scenario, I've got a 4G LTE stick which provides an ethernet interface for WAN, and eth0 and wlan0 is bridged. Thanks!
Since I didn't find a complete solution, I considering making an install script or deb package.
Just what I was looking for to remote into my RPi from VNC Viewer on my iPhone -- Thank you for this amazing documentation!
Thank you!
Great video, easy to follow and just what I was looking for. Subscribed!
Very useful. Thanks man. Keep up the good work!
great quality! Keep it up, dude.
Hi,
Great guide for setting up a wifi router, but it seems to have a limitation of needing to be on a wired ETH0 line for access to internet. I was hoping to be able to use this as a wireless hub linking to a home/work/travel wifi using a second USB wifi link on WLAN1. Then create a simple PHP to choose detected wifi routers. Hopefully this is an easy fix, and what I'm thinking will work out. Thanks
The DHCP lease time doesn't necessarily mean they'll get a new IP address after that. It's up to the client to say "I already had this lease and I want it renewed" which should go smoothly and let it keep its IP and I believe this works even if it has disconnected in between, the client just has to have that claim of lease and the IP has to obviously still be ok for it to use. I don't know under which circumstances clients throw away this information and that may vary by client but it would typically cause an unexpired lease to be thrown away too.
Nice to see that sub number going up. Congrats
Thanks man! means a lot!
Thank you for your tutorial! very informative!!
I think having a better external USB 3 wifi with external antenna would be better for something like this. That would give better speeds. But over all awesome Job Rex man you did.
Excellent, thank you!
very very clear explanations... what about if a want tout add another route ? I mean if I connect a USB TO RJ45 adapter (eth1) wich is connected to another network like 172.16.14.0 . what sould be the command line for this new route??? ...thanks
Really an excellent tutorial!!!!!
Thank you very much for the in depth guide, it was the only one that worked for me.
I only have one small issue, if I install and run NordVPN, the minute I connect my Pi to a VPN, the internet no longer works for the clients, it does work for the raspberry pi if I connect via HDMI and a keyboard.
Is there any way to keep this working with a VPN?
awesome!! perfect timing too, i was literally looking for guides on this just yesterday haha. can't wait to try this! 🤘
Hey glad the timing worked out lol
Thank u for your sharing
Hi again,
Another GREAT video,
I left a comment on your other video regarding Pi router but I believe this one is much closer to meeting my needs and those of other remote access VPN connections. I have an RV in the Georgia mountains and a Unifi UDM-Pro (VPN - Subnet 70) at home here in central Florida. I am able to connect to the UDM-Pro via VPN on my iPhone and Windows laptop so I know the VPN works fine. The RV has access to only a campground 5GHz Public Wi-Fi AP for internet access up to 100Mbps.
I am trying to figure out how to set up the Raspberry Pi to access the Campground Wi-Fi and automatically connect to the UDM-Pro VPN (Subnet 70) at home. I have 2 BrosTrend AC650 5.8GHz USB Wi-Fi adapters that the Pi will be using to connect to the Campground Wi-Fi and as an AP for the RV. The reason for this Pi setup is that I have Wi-Fi devices in the RV that can not be setup to connect to a VPN setup without the help of the Pi. I guess I will need to somehow setup a VPN client on the Pi to accomplish this along with some auto logging for the secret pw and regular password.
Your thoughts,
Don
Awesome tutorial as always, but how can I turn this into a straight access point, no DHCP or routing, this will be provided by my router for home use. I just want to create another access point in the house.
Nice job! Good, aesthetic IT tutorials are not really easy to find ;)
This is very helpful. I'm trying to create a mobile offline network to host a plex server on. I want to use a pi3+, have it act as a router as well as host local files on plex. From there it needs to work offline and send the media to a streaming device like Roku. Can a plex server be installed on top of this?
Good video. Sets itself apart from all the "here are the steps" videos that don't explain why you are doing all these steps
definitely going to give this a try (but with 2 Wifi's - not sure any value of Ethernet since our phones don't have jacks) but this will be a great tutorial for wlan0 and wlan1. THANKS!
This is such an amazing tutorial. Perfect intro by the way :).
I was wondering what the difference is between hardware modes b and g.
Also, how would I set up both 2.4 and 5GHz bands?
so b is 2.4g and g is 5g. I don't know if you could setup both bands... have not tried it
@@SpaceRexWill I thought you said a was 5G
@@BrennerEraFan a was 5GHz
When I wrote this, none of the "I'll put it in the description below" was in the description.
whoops lol added
@@SpaceRexWill when I created the network, it showed a “no wireless interface founded” with an up and down arrow, do you happen to know how to fix it?
Great video, to the point, no BS. That's why I give 5 * if ratings are done in stars
Thanks!
Thanks for the video. Just a trickier question. I've successfully installed two things separately: hostapd (for the access point/router) and tailscale (to connect to an exit node that I have running in a different country [where isp has me behind a NAT]), in the raspberry pi if I switch on the tailscale VPN the thing rpi connects to the vpn, but the AP [hostapd] stops working. And if I switch off the tailscale VPN then I'm able to use it as a normal AP [obviously no VPN routing]. Tailscale creates 2 new interfaces [tailscale0 and lo] and sets some forwarding tables. A bit dark for my knowledge. Do you have any recommendation or quick pointer? Thanks again!
Have you done a video on CardDAV Server? If so I haven't seen it. I have multiple platforms and want them to all be synced together.
This awesome. Even though I only understood parts of it (I'm a Linux and code weenie). Would I be able to use this setup with a pi connected to a public wifi through a Ubiquity nanostation antenna connected via ethernet to the pi? The pi would need to be able to sign up to the public network through a webpage with login credentials.
good tutorial
Easy to follow and a grate tutorial but for some reason I did all the steps but the network doesn’t show up. Any idea how to fix it?
What an awesome video, thank you so much. I have seen some routers launch a web page when we connect to the network, is there a possibility we can do that with a raspi? If it is,where can i get some info about it? Again thank you for all the information.
Hmmmm I bet someone has built a similar project in the past. I would look at Ubuntu guest WiFi or something like that
hostapd defaults to not enabling any of the higher speeds unique to wireless N or AC so it'll be stuck at 54Mbit and a 20Mhz channel. There is a wealth of settings you have to add and on the Pi 3+ and later it is possible to get wireless AC at 433Mbit speeds which is an 80MHz wide channel with single stream AC speeds but the setup is eye wateringly complex.
great concept now what if i hook a battery to the pi
Can you clarify between eth0 and WLAN0 if the devices on the network will be on ethernet ? Do we swap WLAN with eth at every step? I'd like to connect a tablet via pi wifi to the pi to see devices on the pi Ethernet wired to unmanaged isolated switch
Hi SpaceRex. For a research project, i have to do the same process but on a Intel NUC with a 5G modem for internet instead of ethernet. Could you give me some guidance how can i do that?
At 17:10 do I change “interface=wlan0” to “interface=eth0” if I was making wifi to Ethernet?
I am trying to get Ethernet working with this setup, and don't quite get what else I have to change in the text to make it work. Can I get some help?
will it create it without etehrnet like just in case to use
a access point
Have a problem and a question. I have multiple Raspberry Pi's from Model b to Pi4. I also have an old Series 2 Tivo that connect to my Primary router using WEP though an old Linksys USB wireless B adapter. I want to convert my Primary router to WPA and somehow till connect the Tivo though it using WEP. Using one of my Raspberry Pi's would be a good solution and hence my question.
How do I configure the Wireless AP on the Raspberry Pi to support WEP? And which Raspberry Pi's will support this. I know my Pi-4 won't support WEP to connect to an AP and is hard wired. Can't this be done and any information will be greatly appreciated.
Thanks and Loved you video.
How would I connect my rapsberry pi 3 b+ to wifi and use it to for an ethernet cable to connect another pc in a location where I cant hard wire the second pc to the router directly.
What if I added another eth card and created a bridge for eth1 and wlan0. How can I add it to this router if I want it to use this bridge instead of the wlan0 to connect to eth0? Is there an easy way to do this?
Hi SpaceRex,
what a great project! It works properly.
I would like to setup a MQTT project with one ESP32 as a subscriber and another ESP32 as publisher. The broker should be a local RasPi standalone as Broker-Server creating its own WLAN without connection to the Internet via Router or Access Point.
Can you give me hints how to do this?
The handling of the ESP32 should be easy. But with the RasPi I have got my problems to combine the installed Mosquitto and the WLAN-Server capabilities.
Do you have this setup described in one of your courses? (Please without NodeRed.)
Thanks!
Oli
Create uap0 access point.
How do i setup the pi so i can access a wifi network from the ethernet port? I want to connect a server to have wifi access through the pi.
Are there any preconfigured images for a more plug and play setup with the Pi4?
Great vid. Will give it a try.
Could you use this to host Lan games using the raspberry pi and connecting other laptops with Ethernet ?
do i have to connect ethernet to raspberyry pi so it can be a router, or i can go wireless?
When my phone tries to connect it says something about a MAC address and in the totorial you said to look it up but I can’t find anything, can you help me out?
Awesome! - I notice you say it has a net filter to "block things outside you network", Does this mean you can not connect out to the internet via the raspberryPi router?
I'd like to try this but with a VPN running to change geo locations on it.
This block is like the block on your router. It blocks incoming connections that it did not first ask for (so if you go to google.com your pi will let google talk back to you as you started the connection)
Hi mate, I have followed you every line of code, but after configuring all and rebooting the raspberry pi, the sid is not visible in the wifi search, could you please help to investigate it.
Can I connect rasberrypi to some local wifi instead of connecting to Ethernet and do everything the same in this tutorial and will be ok?
i got stuck at 5:53!
what do i type??!!? i did that and i brings me a blank page
also there is only one file directory which is Bookshelf
sudo apt install dhcpcd
sudo systemctl enable dhcpcd
sudo systemctl start dhcpcd
This worked for me.
Can you have both 2.4 and 5 instead of just 1 of them?
Hey dude when I tried to connect to it is said that I connected but it said that the internet was unavailable I didn't plug in an ethernet cable that could be the issue by the way what do I do with the ethernet cable
How would I use the onboard wifi card as a access point, but have my internet coming from 2 wifi dongles on the raspberry pi?
Hey man I got a question I believe I did everything right and it shows that I can connect to it but when I try to it says there’s no connection could you possibly help me figure this out thanks man and good video
and did you fixed it have the same issue
It works fine for me using hw_mode=a but not with hw_mode=b or g, what could it be? i want to router a 2.4ghz AP not 5ghz
which os do i install fopr the raspberry pi
Does anyone know how to set up Pi Hole or something similar to work with this?
I'm struggling to get this to work even after following the guide. I am able to connect to the wifi, but it doesn't actually allow me to access anything (websites, etc). Any suggestions on what might be causing the issue?
Do you remember that scene from Find Nemo when Squirt is telling Dory and Marlin the exit instructions?
"It's like he's trying to speak to me. I know it.“
Do you know how to setup the Raspberry PI 4 as a Dual home... Meaning I can connect to WiFi for all internet activity and then my Eth0 for all private network traffic that is on a different subnet... like for example my home network over WiFi is 192.168.1.0/24 and the Eth0 is 192.168.50.0/24. I want to be able to log into the Raspberry (not headless) to use it to connect to WiFi and my private network at the same time.
can you explain how to get adblocker with pi as wifi router
will this work if i have the waveshare 7600X 4G hat on the raspberry ?
Hello, I have a question, I already have the AP of the raspberry, however when I try to connect from any device, it stays "getting the IP address" and after that does not connect. Do you know what solution may have this problem or what is due?
PD: Sorry for my English
I found this just now since I’m trying to set up my Raspberry Pi to work as an AllSky camera out in the field where I have no internet connection, but want to be able to go out there and connect wirelessly to the RSP with my laptop to see what images have been captured. So there’ll be no router, just me with my laptop or phone trying to connect. Is there a way to do that?
Can i use the wifi router to access lets say I have installed a webserver like Apache2 on Raspberry Pi
Allegedly 802.11ac is supported, I wonder what would be the settings for the hostage.conf file?
Sorry, what is the os installed on Rpi?
Hi, did you already try to setup this WiFi Router as WireGuard VPN client and use it as a travel router ?
this #spacerex @spacerex it would be really nice to show how to adjust this to wireguard VPN client (here's your video ruclips.net/video/hnZNriLs_h4/видео.html&ab_channel=SpaceRex)
great tutorial sir, worked like a charm for my raspberry pi 4.
But now, I have another issue, how to revert back to normal raspberry pi WIFI usage? because I am using pi's WIFI to get internet from home router for my raspberry Pi for normal internet browsing (ethernet cable is not an option here) and I need to use my pi as a router without internet for my other raspberry pi for my D.I.Y Project.
Need to go back and forth in using pi as WIFI and wireless routed access point. is there a way for that?
The easiest thing if you are going to do this often would be to have two different SD cards, then manually switch them out
@@SpaceRexWill Thank you for the excellent idea sir 😊.
@@SpaceRexWill how to actually revert this though?
Would this work for gaming?
Awesome video. I have a suggestion for your next video. Same as this one but instead of "just" a router.... make it a VPN router. In other words, share the wifi but the internet (eth0) is connected to a VPN. That would be cool!
I should have mentioned this in the video but if you hook up the PI to a VPN then this will automatically happen
@@SpaceRexWill Any suggestions to do the same with a proxy instead of a VPN? I hooked PI to a proxy but the traffic is not routed through the proxy.
I can see my raspberrypi as a possible wireless network but it says checking network requirements and then says cant connect to this network? Anything i can do to determine why?
So i am thinking i could use this with my LTE 4G hat (wwan0) and share that to the wlan0 so it becomes an all in one LTE modem / wireless router. Has anyone ever done that?
I actually find this video pretty helpful, but I have a problem. I can connect to the access point, but I don't have internet. Do you know why?
Do you have this written out some where?
I'd completely disregarded the fact that you require two interfaces in order to make this work, I tried create an AP using wlan0 and also connecting to the main router using wlan0. :D
These instructions seem to work to connect from Windows but when I connect from an Android Tablet it says "connected without internet". It has something to do with the DNS settings. I mean I have no idea this is a guess. Is there something else that needs to be done to setup the DNS?
Does it have to be raspberry os? Could it be simple Ubuntu
Can this work with parrot security edition?
so when i connect to the internet or wifi i made it says connected without internet :/ and when i go into tiktok as a test (im using samsung (mobile)) it loads vids but i cannot like and it will not load my pfp like it has no internet when it should do you know what i should do
Can You attack it using WiFi attacking tools?
when i ping the pi, it says "destination net unreachable". What is the problem here? i did everything like said in the video
Hello, I don't get it, I followed your directions to a "t" and now the Raspberry Pi 4B works as a wireless router...BUT...only when the ethernet cable is plugged in. I would like to be able to do both, but most of the time I just want to use it as a wireless router, without the ethernet cable. Is there a solution?
I followed the entire video and I got a "no wireless interfaces found" error, is there a way to fix that?
Can you make this private and can you connect the pi you’re running it from to it?
I tried this on my Pi 4 model B and it says "not found" and "does not exist" so is this outdated??? Please advise!
After following the tutorial, when trying to connect to it, it couldn't, giving back that it couldn't get the IP adress. how do I fix this?
Did you use Raspberry pi os Lite or Raspberry Pi OS with Desktop
90% of the time I run lite as I normally only interface using CLI and its faster to write to the SD card
i tried to do the iptables but it doesn't work because the command -t is not included
what about from a 4G module to wifi?
My WiFi say that i have no internet conection
What did i wrong?