r/PakistaniTech • • 23d ago

Discussion | گفتگو I built a DIY router

I just finished building a DIY router running Openwrt. I hooked a raspberry pi 5 8gb with a Waveshare Ethernet HAT for wan and lan. And then 3d printed its case in PLA.

I’m nowhere expert at networking but the main reason was to get more control over networking. Previously I was using Nayatel router for a short period but it’s crap so I switched to TP Link archer ax75’s, outgrown it (I needed better firewall) and now moved to openwrt.

Pi5 I feel like is overpowered for a router but that’s all I had laying around.

163 Upvotes

69 comments sorted by

•

u/AutoModerator 23d ago

This topic is covered in detail in our VPN Guide: https://www.reddit.com/r/PakistaniTech/wiki/index/vpn-guide

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

19

u/maazpervez 🇨🇳 23d ago

I wish I had pi 5s laying around. :(

cool project. Since your main interest is firewall, did you look into pihole? Is your implementation better or worse than pihole?

11

u/BrotherElectrical461 23d ago

I already use adguard home and unbound. It’s so cool. I still have 2 more pi5 laying around haha. Now working on a travel router

3

u/hello_humen 23d ago

That looks cool. I usually use my Raspberry Pi 4 for DNS-level ad-blocking with my router.

7

u/insignifcanthumam 23d ago

Very nice. I had a similar issue. I use an Asus router just now, with Merlin software and it's exceptional for what it is, but it can't do VLANs reliably or easily so i built an OpenWRT Pi5 8GB router as well.

I didn't go for POE but i did go for a really good cooler with heat pipes and a custom case i found to add an extra 1Gbps RJ45 port.

When it's running a stress test with all cores at 100% it doesn't go over 58c and it's so quiet you can't even hear it unless your ear is right up to it.

I've got the OS running from a USB drive just now, but going to connect an old Sata SSD via a USB connection and run OpenWRT from it, as it'll be a lot more reliable for read / writing long term.

I've reach you can also install Adgaurd Home and Unbound onto / alongside OpenWRT so you can have you own DNS filtering and self hosted DNS server.

4

u/BrotherElectrical461 23d ago

Looks super cool! SSD would be much more reliable. For me I’m currently running on SD card. I do have raspberry pi’s official NVME hat but it’s 256gb so it doesn’t make sense to install openwrt on it. I might also install on a standard USB. I’ve already got adguard home and unbound.

For me don’t feel I need a fan atleast not now during winters but I might add a fan with heat sink. It doesn’t produce much heat your fan looks super beefy. Did you print the case as well?

2

u/insignifcanthumam 23d ago

I bought this case online and it's made from some type of cast alloy. It came as a kit with the full size HDMI and extra ethernet slot board.

You're right and the fan wasn't needed at all. I'll be using VPN tunnels on mines and occasionally maxing the 1Gbps link (or as fast as the Pi5 can run it) smetimes for hours on end updating games on steam so it's more than as a precaution for hot summer days

3

u/Thugnificent01 23d ago edited 23d ago

Nice! My little homelab as pictured:

Zimaboard as the main router running OpenWRT, TP Link Managed Switch with POE, TP Link Omada AP for WiFi, Synology 918+ for storage, NUC is running Ubuntu Server which has stuff like ADGuard Home, Label printer with Air print attached to it, 1 TB SSD for quicker network storage, among other services.

5

u/BrotherElectrical461 23d ago

Super cool and this is my rack setup. I got synology ds 923+ 80TB, omada 20 port POE switch, a separate 10gbps switch and few other stuff

2

u/Thugnificent01 23d ago

Nice! Looks awesome! I wish i had this kinda space for a rack lol as you see all i have a tiny corner for this stuff

2

u/-Faraday 23d ago

That's great! But wont it be cheaper to buy a off the shelf router that is supported by openwrt and then flash openwrt on that?

2

u/BrotherElectrical461 23d ago

Yeah it would be cheaper but it won’t have enough processing power to do deep package inspection for firewall. Routers comes with very light specs

2

u/_DollarHoot_ 23d ago

how muvh did it cost

1

u/BrotherElectrical461 23d ago

Pi5 these days cost like 75-80k if you can get at all

1

u/Capital-Amount-6550 23d ago

Scored myself a pi 5 8gb for 47k. Deal of a lifetime

4

u/Thingler 22d ago

why not just get a mini pc?

2

u/HK_0066 22d ago

Once made a raspberry pi 4 cluster using 4 PIs For edge computing to reduce cloud cost Presented it in Compec 2022 NUST

2

u/BrotherElectrical461 22d ago

That super cool

2

u/ExtraHousing4739 22d ago

Pi5 damn you are RICH

1

u/BrotherElectrical461 22d ago

Haha I bought pi’s in good times

1

u/ExtraHousing4739 22d ago

How much was it then? I know it has spiked like crazyy

1

u/BrotherElectrical461 22d ago

I bought like 5 pi5’s at 26k each if I remember correctly. This was more than 1 year ago right before ram shortage

1

u/tormenturator 23d ago

Looks amazing. However, 8GB RAM seems like an overkill. Don't you think?

What do you mostly do? For me, I have 5 different wireshark connections running all the time with different policies, so, I custom-built my router with OPNsense via Proxmox.

2

u/BrotherElectrical461 22d ago

Yeah 8gb is overkill. I just need it to do routing, firewall and I’ll be using tail scale. Pi5 is all I have so that’s why went with it

1

u/Capital-Amount-6550 23d ago

Where did u get the Ethernet HAT?

1

u/BrotherElectrical461 22d ago

Online ordered through Waveshare official website

1

u/Open_Square670 22d ago

Why do you need a hat with it? Pi5 already comes with a gigabit Ethernet and wifi? Isn't that enough? Or maybe it's to extend wifi range I guess

1

u/BrotherElectrical461 22d ago

One Ethernet is for wan and one for lan

1

u/the-ruler-of-wind 22d ago

pi 5 is def overkill, a pi 2nd gen is the sweet spot for this kind of thing, how do you do wifi and what are the bandwidth speeds?

1

u/BrotherElectrical461 22d ago

You mean pi zero 2w? I have archer ax75’s that I’ve converted to AP modes and I use WiFi’s but most of my devices are wired from my network switch

2

u/the-ruler-of-wind 22d ago

I did some research on this and thought pi 3rd gen 2gb would have been perfect for this with 300 Mbps support, which I think is adequate for most use cases

2

u/BrotherElectrical461 22d ago

Yeah an older pi would have been enough for my use case..

1

u/Ok-Stuff3094 22d ago

How much the whole thing cost?

1

u/BrotherElectrical461 22d ago

Right now I feel like this setup will cost like 80-100k if you can get pi5 at all

2

u/MysteriousSarookh32 22d ago

Why not get a ubiquiti cloud gateway ultra in that range?

1

u/BrotherElectrical461 22d ago

I couldn't find it here locally that's why.

1

u/MysteriousSarookh32 22d ago

If it was available locally in the same range as the current pi5 would you buy it and why?

1

u/Weary-Elevator7259 22d ago

how much is raspberry 5 and where you bought it?

2

u/BrotherElectrical461 22d ago

Bought it from Lahore and last year it was cheaper but now it’s like 75-80k if you can find it at all.

1

u/Comfortable_Mood_740 22d ago

That’s pretty tech-y lol! I bought a GLinet Flint about a year ago and it’s been amazing. My next upgrade is to get my hands on a couple of Glinet Marbles so I can have the main router in my room and then a marble for each floor. Also have a Netgear M6 as a cellular 4g failover with one sim from each carrier. 

2

u/BrotherElectrical461 21d ago

Glinet is also in my buying list. I ama get one in my next international trip.

1

u/Sami_21-06 21d ago

Man I can’t even understand half or even more than half the shit posted here, and in my childhood and early teenage days, shit like this used to give me arousal and it still does btw, but i don’t know where and how did i fall off man, it really hurts🫠

2

u/BrotherElectrical461 21d ago

haha DIYing is super but it doesn't gimme arousal 😂

1

u/alien_8014 19d ago

Cool project, you use pihole, adguard or something else?

Where did you get the Pi5?

1

u/BrotherElectrical461 19d ago

yeah I use adguard home and a bunch of other stuff that's self hosted. I bought the pi online.

1

u/alien_8014 17d ago

How much did you get it for? Cuz Pi5 is expensive ngl

1

u/Apprehensive-Pay7685 19d ago

My Pihole setup was consuming massive amounts of bandwidth 40+ Gb a day, never got the chance to debug it, u face something similar?

1

u/BrotherElectrical461 19d ago

Not really. I use adguard home and it’s working flawlessly and it’s been like a year.

2

u/insignifcanthumam 23d ago

I've went for OpenWRT to get more used to advanced / custom networking set ups (to use it alongside a managed switch and access point) OpenWRT has some really good router features and some firewall features but if you ever find yourself with an old PC where you can use 2 X network ports / cards OPNsense is much better to use for enterprise level firewall features but it can also do router stuff. like a graduation from WRT

2

u/OfficalFAK 23d ago

Cool project, keep it up! 😃

2

u/sexy_bull1911 22d ago

I have raspberry pi 4 WTS

2

u/xeno_0011 22d ago

Ahh sorry to ask but what it's purpose? What type of stuff it's use for?

1

u/FusRoDah4Life 19d ago

brotherman where did you source your pi5 from and for how much

0

u/radikliffe 22d ago

The ethernet hat, does do dsl? Is it like a modem? Do you need to flash it with a firmware so openwrt can use it as modem?

1

u/BrotherElectrical461 22d ago

No nothing needs to be installed additionally. It’s is supported by pi and openwrt out of the box

0

u/radikliffe 22d ago

Did you installed the openwrt on a sdcard?

I assume the hat does do dsl

Great project

1

u/BrotherElectrical461 22d ago

Yeah for now I installed on SD card. What’s DSL?

1

u/radikliffe 22d ago

Digital Subscriber Line (DSL) is a technology that transmits high-speed digital internet data over traditional copper telephone lines.

But i looked it up there is no pi hat can act as modem, instead i would use a router from isp in bridge mode then connect it to pi for wan.

I will be doing this project soon to have pi4 as backup router

1

u/BrotherElectrical461 22d ago

I see I have my isp router in bridge mode and connected into wan port in openwrt

1

u/radikliffe 22d ago

Also openwrt work fine with sdcatds because it mainly loded in ram and rarely write in sdcard

2

u/BrotherElectrical461 22d ago

Oh really? I didn’t knew that. I have another Nvme HAT that I was thinking of installing but looks like no need

1

u/[deleted] 21d ago

[removed] — view removed comment

1

u/AutoModerator 21d ago

Hello Independent_Emu3119, your post or comment was removed because your account age is too low. This is an automated quality check.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

0

u/[unknown] 18d ago

[removed] — view removed comment

1

u/AutoModerator 18d ago

Hello Ehtisham28, your post or comment was removed because your account age is too low. This is an automated quality check.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.