Turn Your Raspberry Pi into a Wi-Fi Repeater: Step-by-Step Guide (Part 3)

Turn Your Raspberry Pi into a Wi-Fi Repeater: Step-by-Step Guide (Part 3)

Join us in Scene 3 of our Raspberry Pi Wi-Fi Repeater series! This step-by-step guide walks you through compiling Wi-Fi dongle drivers from source, setting up Network Manager to connect to your router, configuring the Pi’s Wi-Fi adapter, expanding the file system, and installing DNS Masq for DHCP. Whether you’re extending your network to the garage or just geeking out, this tutorial is for you. Check out our other videos for the full setup, and subscribe to join our community of tech tinkerers!

Introduction and Recap 00:00:00
Wi-Fi Dongle Driver Compilation 00:00:04
Network Manager Setup 00:00:50
Connecting to Existing Router 00:01:05
Raspberry Pi Wi-Fi Configuration 00:03:23
Expanding File System 00:04:12
Verifying Wi-Fi Connection 00:05:05
Setting IP Address 00:06:39
Installing DNS Masq 00:08:53
Configuring DHCP Server 00:11:04
IP Forwarding Introduction 00:16:20
Closing Remarks and Subscription Call 00:16:44

Thanks for watching!

Find us on other social media here:

  • https://www.NeuralLantern.com/social

Please help support us!

  • Subscribing + Sharing on Social Media
  • Leaving a comment or suggestion
  • Subscribing to our Blog
  • Watching the main “pinned” video of this channel for offers and extras

Yeah, there we go.

Okay, so we’re back.

I went away.

I forgot exactly what I told you before I cut the video, but I went away.

I recorded a different video where I installed the drivers for this Wi-Fi dongle.

I compiled them from source.

I found them on GitHub.

I wanted you to go to that video and use it to learn how to compile the drivers for your

own Wi-Fi dongle.

If you want to have the same dongle that I have, that video I should have a link to where

a link to where you can buy the same dongle that I have.

But if you have a different dongle, that’s okay.

The instructions in the other video should probably help you.

So at this point now, you’ve gone away to compile the drivers for your Wi-Fi

dongle and you’re back, you’re ready to continue making your Pi access point.

So what we should do is I’m logged into the Pi right now.

And let’s use Network Manager to see what’s up.

Let’s use network manager to see what’s up.

Network manager connections show.

We only have ethernet up right now.

We want to connect as a client to your existing router.

So remember we have two radios.

One is going to be the internal radio of the Pi or a dongle if you wanted to buy two dongles.

And then the other one is going to be the dongle that we’ve been talking about.

So I mean, I’m saying you can buy two dongles and stick them in the Pi if you want a little

bit more range.

For me, I just use the internal of the Pi and then the dongle as the external.

the external so the dongle is going to connect nowhere it’s just going to be an access point so

that other clients can connect to it so I’m going to connect as a client specifically using wireless

LAN zero because that’s the built-in ethernet sorry wireless adapter of the pie we can do this

in network manager we don’t even need a desktop we’ll say pseudo network manager device Wi-Fi

connect and then we just have to specify the name of your original or how about your primary

original or how about your primary access point you know whatever it is whatever your wi-fi

credentials are you got to put that there i’m not going to show you i’m going to type this into

another window so that you don’t have to see the name of my access point let me go sudo network

like that the name of the access point and then after that you have to put a couple more things

in so you’re going to do the interface name you should name which radio you want to do the

connecting as a client so I’m going to put WLAN zero because that’s what we just said if name

WLAN zero in the other window and then you want to provide the password for your wi-fi access

point so I’m just going to put password here your password here and then I’m going to type that for

And then I’m going to type that for myself up in the other window.

Oh, shit.

There we go.

Okay, I think that’s probably all we need right now.

I’m just going to hit enter on my other window.

You should hit enter now.

it’s saying that it does not see the network we forgot to turn the radio on the the wi-fi adapter

is off right now so that’s that’s a default thing with the raspberry pi so we’ll go into a tool

called raspy config raspy config raspy config um you could use a program called rf kill to activate

the radio but the raspberry config is more fun so what you want to do is uh after you say you know

sudo-rasby-config, you go into localization options, and you select the wireless LAN country.

So that’s, you know, because different countries have different regulations, they’ll restrict like

the frequency bands you can use or whatever. I’m not sure about all the countries, but I’m going

to find United States in the use. There’s only a few of us, only a few use. And now the Wi-Fi

idea, I go to advanced options and select expand file system. Because if you remember, I’m going

to do a reboot real fast. Yeah, if you recall, we, what’s going on, man, I want to ping.

We wrote a very small image to the card. It was only like two gigabytes or something, right? So

that means the file system is only two gigabytes, but the card is way bigger than that. And I want,

to be able to take advantage of all the space on the card so that’s why you expand the file system

and raspberry pi has like a nice little tool that helps you do that so it’s pinging again i should

be able to get in there okay uh going back to my other window real fast i’m just going to check that

the uh the connection actually worked so wireless lens zero oh it didn’t even work last time for

sure so we’re gonna we’re gonna repeat that command because the wi-fi wasn’t on before right so

the wi-fi wasn’t on before right so so if you recall uh we did sudo network manager device wi-fi

connect and then the name of your access point and then if name wireless land zero and then the

password i’m going to type that into my other window here and if we’re lucky it’ll connect

yeah okay it seems to uh have worked and then sudo and see what you should show okay

rename the connection real fast and then I’ll show it to you in the main terminal windows

so you do network manager connection edit main one and set the connection ID to how

about just like connect as client save quit show okay so now I think I can show you this

so it’ll pseudo network manager command line interface connections show and you can see

connected as a client to the rest of my network. At this point I could pull out the ethernet

adapter if I wanted to, but I still don’t like doing that because it’s pretty easy to lose your

connection and screw everything up and the ethernet is there to save you. But for now I have connected

as a client on wireless LAN zero. Make sure you have the right one selected. And if you did it

wrong you can do pseudo network manager connection delete and then just name the connection. But I

So let me just edit the IP address real fast.

Edit, connect as clients.

You’re probably gonna wanna do this

because remember we talked before

about the idea of you having IP addresses

that you had to come up with to follow this video.

So I’m going to, oh gosh, what’s happening?

There we go.

Let me go to this one.

Right, so I’m trying to set up wireless LAN 0 so it’s going to be 147 for me.

Maybe not the same thing for you.

So I’m going to go, let’s see, I just edited it.

Okay, so I’m going to set ipv4.addresses as that with a 24 block.

And yes, I want to set to manual.

I want to set the gateway.

Basically this is the same thing that we did with the ethernet already.

Then I’m going to set the DNS.

DNS, the only difference here between, you know, this connection and the ethernet connection

is I’m just setting a different IP address, but I’m giving it the same gateway and the

same DNS servers and everything.

So DNS search, home, I’m going to save it and then I’m going to quit it.

At this point you could reboot the Pi.

Maybe I should do that so I can read my notes a little bit more.

Let’s reboot the Pi and let’s see if we can connect on the wireless interface.

interface so I think it was 147 I just set up let me do a ping at 147 so I’ll

know if the Wi-Fi comes on I may have forgotten to tell it to auto connect

like I did last time but I feel like the Wi-Fi does that already we’ll see what

happens I’ll just give it like 10 more seconds yay it worked okay so now we’re

through the wi-fi notice how it says i don’t recognize this remote because it’s a different

ip address but we’re on the pi so now you’ve got two ways to get into your pi i’m actually going

to revert because i like staying on ethernet but uh just so you know this is how the pi will get

its internet after you eventually put this repeater somewhere where you can’t get ethernet you know

like in your garage or on top of a china hutch or whatever so um the next thing that we need to do

The next thing that we need to do is, um,

we need to install a program called DNS mask. We need a DHCP server because what’s,

what’s going to happen basically is when we connect it as a client to the primary router,

its DHCP server gave us an IP address on the normal subnet. So that’s fine. We don’t really

need that for the primary connection. But when we become an access point with the extra antenna,

connects to our pi as a client is going to need ip addresses and it’s not going to be able to get

the ip address the clients are not going to be able to get the ip address their ip addresses

from the router anymore because they’re not even connected to the router they’re connected to the

pi and there’s an isolation because there’s two different networks so that means we need to put

a dhcp server on the pi so the pi can just decide what ip addresses everybody has on its network so

I think what I’m going to do since the video is already about 15 minutes long into this particular segment

and I think the whole video is already like over an hour for sure

I’m going to pause the video and I’m going to go away and make another video

where I just talk about how to install DNS mask on your Raspberry Pi

so you should go to that other video and then come back

when you have a DNS mask all set up

and then maybe I’ll just copy paste the config

config that i’m actually using for this particular project just to make it more clear this is the

sample configuration file for dns mask it’s not too bad that that’s kind of it it’s kind of all

you have to do so uh i think i’m just going to install dns mask right now for you what i did a

moment ago is i said sudo apt install dns mask so it’s already installed for me and then to give it

called etc dns mask and any file you create in this dot d directory and this is kind of typical

for programs that recognize a dot d drop directory you can just stick configuration files in there

and they’ll be read automatically so this is the configuration i’m going to use for my dhcp server

on my pi you should probably use something similar but not exactly the same or not necessarily it

I’m using my search domain of home so you don’t have to do that because you don’t even you probably don’t even have the home domain unless you want one and then I’m gonna I’m gonna specify what IP addresses should get assigned to clients that connect to the access point.

the adapter this doesn’t work otherwise I guess it’s fine by default nobody’s

gonna be looking at this PI I don’t know maybe I should specify the adapter I’ll

make a note or I’ll come back in a second but anyway so we want to specify

an IP address range if you recall our IP address range that we chose for the

clients of the access point is going to be dot five dot something right so this

the subnet should match what we’ve chosen.

So all of the IPs that we give away should start with 192.168.5 and then something.

So notice out here I’m just saying 192.168.5.10.

So I’m saying that the first IP address that I will give away is a something.10.

And the last one that I’ll give away is a something.150.

I think most people don’t go up that high, but I just feel like it.

I want to go from 10 to 150.

and that gives me a little room to statically assign lower addresses if I really feel like it later or

High addresses if I feel like it later

This subnet right here. That’s the same thing as a slash 24 block

It just means only the last number should be able to change and then the least time 24 hours

That means if the if the PI

DHCP server gives an IP address to a client then that IP address should last for about 24 hours before the PI has to decide

decide um you know on another ip address or if it’s going to give it a longer lease or something

on the same one it’ll just it’ll just redetermine what’s going to happen uh then we’ll send a dhcp

option uh basically we’re going to tell the clients hey here’s the ip address of your gateway

so that’s called option three for dhcp options so we say three comma and then the dhcp server is

going to be dot five dot one at the end because that’s the number we’ve designated for wireless

for wireless LAN one, the gateway, you know, the wireless dongle that we’re setting up.

Then we’re going to send DNS servers.

You need DNS servers so that your clients can actually resolve names to addresses,

you know, like yahoo.com or google.com instead of their numbers.

So that’s going to be option six.

And then you basically just put every DNS server you know about,

or you want the clients to know about, separated by commas.

Just to point out also, we’re not covering IPv6 in this video

covering IPv6 in this video because we’re trying to keep it short but you probably want to continue

eventually and set up IPv6 on your own at some point but this will totally work without it

so my DNS servers are 1.101 but again you probably don’t have those as DNS servers

yours are probably just going to be the IP address of your router or maybe you can put in some public

DNS servers like 8.8.8.8 whatever you do write it all down there and save it

and before we try to run dns mask let’s watch messages and see what’s going on

actually you know what let me just type it and i won’t show you because there’s probably

sensitive stuff in there you use a command to watch service logs called journal control so

you’ll say pseudo journal control dash dash unit and then you just name the unit that you’re

interested in watching if you type if you press enter right now you’ll see all of the logs and

you’ll be able to scroll up and down, hit Q to exit.

But if you just wanna follow the logs in a live view

to see maybe problems as they’re occurring,

then you’ll do a dash F for follow.

I’m gonna do that in my other window right now,

just so that I can maybe catch myself

if something goes wrong.

So I’m gonna like copy paste this up here on a terminal.

Blup, blup, blup, blup, blup.

Okay.

So it says,

I think it actually just like reset itself once I change the config file.

That’s kind of cool.

So, but then the next steps you want to do just to be sure that this service is actually going to run for you.

You’ll say sudo system control status DNS mask.

And then it says it’s enabled on my system.

So then I’m going to do sudo system control enable dash dash now.

And that’ll just ensure that it’s enabled.

so it’ll start whenever the system boots and then it’ll start it right now also and every time you

change the configuration you probably want to do something like restart I actually I’m not sure you

need to do this because it looks like it was picking up the config while I was typing it and

saving it so pseudo apt sorry pseudo system control enable now and then restart and then

the DNS server should be running let’s see how much time do we have seven before I have to cut

So now we’re at the point where we have to set up IP forwarding because what’s going to happen is…

Actually, you know what? Let me do a scene cut because this is going to take more than seven minutes.

We’re almost there. We’re actually almost finished.

Well, not quite. We’re getting closer.

Okay, I’m going to do a scene cut.

Hey everybody. Thanks for watching this video again from the bottom of my heart. I really appreciate it.

really appreciate it. I do hope you did learn something and have some fun. If you could do me

a please, a small little favor, could you please subscribe and follow this channel or these videos

or whatever it is you do on the current social media website that you’re looking at right now.

It would really mean the world to me and it’ll help make more videos and grow this community.

So we’ll be able to do more videos, longer videos, better videos, or just I’ll be able to keep making

kindness and subscribe. You know sometimes I’m sleeping in the middle of the night and I just

wake up because I know somebody subscribed or followed. It just wakes me up and I get filled

with joy. That’s exactly what happens every single time. So you could do it as a nice favor to me or

you could troll me if you want to just wake me up in the middle of the night. Just subscribe

and then I’ll just wake up. I promise that’s what will happen. Also if you look at the middle of the

screen right now you should see a QR code which you can scan in order to go to the website which

which I think is also named somewhere at the bottom of this video and it’ll take you to my

main website where you can just kind of like see all the videos I published and the services and

tutorials and things that I offer and all that good stuff and if you have a suggestion for

clarifications or errata or just future videos that you want to see please leave a comment or

if you just want to say hey what’s up what’s going on you know just send me a comment whatever I also

in the middle of the night, I get, I wake up in a cold sweat and I’m like, it would really,

it really mean the world to me. I would really appreciate it. So again, thank you so much for

watching this video and enjoy the cool music as, as I fade into the darkness, which is coming for us

all.

Thank you.

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply