A user asked me the below.
Hey, did you use any guides for setting up your pie hole and/or installing the button?
Was interested in making one of these as well.
Any tips or w/e would be appreciated, thanks!
This was my response. which is probably definitely rslurred but w/e
!codecels roast me
No Guides, but happy to give tips, and follow ups where things are unclear.
Button is pretty cool for sure... but you can do everything you need to do from your computer and phone.
A pihole does not protect you unless you set it up as your DNS on your router.
I would also recommend setting up a vpn to your home network using openvpn that way you can take your protection on the go, itll protect you from getting throttled by your cell phone provider too
Parts
-
Get a raspberry pi (here is fine https://www.raspberrypi.com/)
-
- get a case/fan if you are so inclined but I would consider it extra
-
- will come with an sd card and an sd card reader
-
- should come with a power cord
-
Breadboard https://www.amazon.com/dp/B0BNH7LYH3
-
resistor https://www.amazon.com/dp/B01GQFVSXK
Config Pi
-
Download the Raspberry Pi Imager from here https://www.raspberrypi.com/software/
-
Install pi lite on the SD card
-
- During Install configure the thing for wifi and ssh
-
- Set up a user for yourself on there and a password
-
Put the SD card into the Pi (contacts towards the board)
-
Start up the Pi and ssh into it
-
Install Pihole (follow these instructions https://github.com/pi-hole/pi-hole/#one-step-automated-install)
Code
-
Look its probably right... but how you set this thing up makes a difference
-
Put this on your Pi maybe call it buttonscript.js
-
{YOUR USER HERE} needs to be swapped out for the user you created
const fs = require('fs');
const Gpio = require('onoff').Gpio;
const { exec } = require('child_process');
// GPIO pin number
const buttonPin = 17;
const logFilePath = '/home/{YOUR USER HERE}/buttonscript.log';
// Setup the button GPIO as input
const button = new Gpio(buttonPin, 'in', 'falling', { debounceTimeout: 200 });
// Function to disable Pi-hole blocking for 5 minutes
function disablePiHole() {
const timestamp = new Date().toISOString();
const logMessage = [${timestamp}] Button pressed. Disabling Pi-hole for 5 minutes...
;
console.log(logMessage);
fs.appendFile(logFilePath, logMessage + '\n', (err) => {
if (err) {
console.error('Error writing to log file:', err);
}
});
exec('pihole disable 5m');
}
// Add event listener to the button
button.watch(disablePiHole);
// Cleanup GPIO on process exit
process.on('SIGINT', () => {
button.unexport();
process.exit();
});
Service
-
This thing needs to start back up when power fails so you need to set it up to do that
-
go here
cd /etc/systemd/system/
-
run this to create it
sudo nano buttonscript.service
[Unit]
Description=Button Script
After=network.target
[Service]
ExecStart=/usr/bin/node /home/{YOUR USER HERE}/buttonScript.js > /home/{YOUR USER HERE}/buttonscript.log 2>&1
WorkingDirectory=/home/{YOUR USER HERE}/
Restart=always
User={YOUR USER HERE}
[Install]
WantedBy=multi-user.target
-
save and exit nano
-
run this
sudo systemctl enable buttonscript.service
-
run this
sudo systemctl start buttonscript.service
Circuit
-
find your pinout, I am showing a 4b there are others
-
3.3 to a rail on the + side of the breadboard at the top using these wires https://www.amazon.com/dp/B01EV70C78
-
in that top rail, put the resistor in
-
resistor to the left hand side on maybe the top row of the breadboard
-
gpio 17 to left side on that row using these wires https://www.amazon.com/dp/B01EV70C78
-
button to left side on that row use the breadboard wires there
-
other terminal on the button to the right side of the breadboard
-
ground to right side on that row using these wires https://www.amazon.com/dp/B01EV70C78
Package to suit, and your done
Jump in the discussion.
No email address required.
ayy dat me
was just looking for a interesting project to work on to frick around with a pi for the first time.
not really concerned about min maxing privacy, but seemed like an added benefit.
*If anyone has other interesting pi project ideas, post them. Bc I'm getting a couple.
Jump in the discussion.
No email address required.
Yeah it's really good at kind of passively increasing your protection if you will
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Massive attack surface right there
Jump in the discussion.
No email address required.
If they are close enough for that then the below is happening
BSD STAN.... WE GOT A BSD STAN OVER HERE. See no one cares
They would have to be smartarded to open 22 inbound considering this sits in the network
Ok !r-slurs ill go live in a cave now
Jump in the discussion.
No email address required.
I think there was a website that showed how many open piholes there were on the internet. That was funny.
Jump in the discussion.
No email address required.
That's probably crap ISP router configuration I don't even trust that
Jump in the discussion.
No email address required.
More options
Context
More options
Context
That's not free as in freedom software. I would never use that
Jump in the discussion.
No email address required.
More options
Context
More options
Context
What do you recommend, oh wise one?
Jump in the discussion.
No email address required.
I like pfSense.
I installed it on some shit box, and it works great! It runs on some paranoid BSD variant, and I never have any performance issues. Plenty of configuration options too.
Jump in the discussion.
No email address required.
Opnsense supremacy shall never be questioned.
Read what I wrote above. Now picture in your head that I put a /s at the end. Good job sweaty!
Jump in the discussion.
No email address required.
Let's see how they're doing....
I remember it being the same thing but with less features and a smaller community for help.
Jump in the discussion.
No email address required.
It’s the same thing pretty much now but it’s been long enough that they both have a community.
All I really know is I have https://shop.opnsense.com/product/dec750-opnsense-desktop-security-appliance/ for my internet accessible services and it’s fricking awesome.
Read what I wrote above. Now picture in your head that I put a /s at the end. Good job sweaty!
Jump in the discussion.
No email address required.
That's good to hear. When I looked at OPNsense, it seemed like it was just starting out.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
Linky all the things plz
Jump in the discussion.
No email address required.
More options
Context
More options
Context
This whole thing was about dns blackholing for the lay person with a button in case you wanna hit that sales link for amazon.
I assume pf sense intergrates that feature? Does it do ddns and opev vpn too?
Jump in the discussion.
No email address required.
I mean... you open up its webpage like any other router and install it. But thanks for helping out the tards.
Yeah and yeah. You can pretty much do whatever you want because it runs on BSD, and it's got a company maintaining and developing features.
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
GNU Hurd
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
Did you really spend $10 on a button for your pihole?
Transform your Marseys!
www.pastebin.com/Jj9URfVi
Jump in the discussion.
No email address required.
I spent $10 on something for my parents because they wanted a big red button I didn't say it was a good idea
Jump in the discussion.
No email address required.
I take back my derision. A large red button is appropriate for this application.
Transform your Marseys!
www.pastebin.com/Jj9URfVi
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
Snapshots:
https://www.raspberrypi.com/:
archive.org
ghostarchive.org
archive.ph (click to archive)
https://www.amazon.com/dp/B09KZK8SXQ:
archive.org
ghostarchive.org
archive.ph (click to archive)
https://www.amazon.com/dp/B01EV70C78:
archive.org
ghostarchive.org
archive.ph (click to archive)
https://www.amazon.com/dp/B0BNH7LYH3:
archive.org
ghostarchive.org
archive.ph (click to archive)
https://www.amazon.com/dp/B01GQFVSXK:
archive.org
ghostarchive.org
archive.ph (click to archive)
https://www.raspberrypi.com/software/:
archive.org
ghostarchive.org
archive.ph (click to archive)
https://github.com/pi-hole/pi-hole/#one-step-automated-install:
archive.org
ghostarchive.org
archive.ph (click to archive)
Jump in the discussion.
No email address required.
More options
Context
srsly
at least use python m8
Jump in the discussion.
No email address required.
There is literally no difference between python and javascript
Jump in the discussion.
No email address required.
More options
Context
I like node. It worked. What does python get me?
Jump in the discussion.
No email address required.
Both are the wrong answer.
Use perl
Or c
Or ASM!
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
Last I checked, ad guard was better than pihole since it natively supported encrypted dns. All the same ad block filters work
Read what I wrote above. Now picture in your head that I put a /s at the end. Good job sweaty!
Jump in the discussion.
No email address required.
Put links for some gas please
Jump in the discussion.
No email address required.
https://adguard-dns.io/en/welcome.html
Read what I wrote above. Now picture in your head that I put a /s at the end. Good job sweaty!
Jump in the discussion.
No email address required.
More options
Context
More options
Context
More options
Context
I thought pihole was supposed to be innovative but it literally just blocks requests to advertiser IPs? So it's as good as a browser extension and is recognized by anybody looking for an adblocker, like streaming services.
Didn't someone make a tool that allows the requests to complete but just doesn't show the ads?
Jump in the discussion.
No email address required.
generally its also billed as a bandwidth saving tool. It can also be used network wide so you can protect phones from it too
Jump in the discussion.
No email address required.
More options
Context
More options
Context
Wrong
Because you're not using perl
Can't believe you're using js for this
Jump in the discussion.
No email address required.
More options
Context