News for hackers. Stuff that matters.
Re:Mmm, Pi-hole by windexh8er on Wednesday September 26, 2018 @09:20AM (#18075603)
I'm surprised this is the top slot right now. Troy, generally, puts out interesting info on security related news however this feels a bit minimal. Since the project has been around a number of years now, and it's not relegated to only a RPi I would have expected him to delve into things a bit more. Pi-hole will also break things. I think the common one I always heard from users on my network at home were that Google click-thrus for products always fail. But... Don't deploy it on an RPi. It's not worth the inconvenience of maintaining another entire device for a network service. There's an actively maintained container I'd recommend, or it's very easy to deploy as a VM. Troy also didn't hit on anything like DoH or DoT, surprisingly.

Container link: https://hub.docker.com/r/pihole/pihole/

Edit: word

Re:Mmm, Pi-hole by wp381640 on Wednesday September 26, 2018 @10:55AM (#18076554)
Troy's skill is taking security and privacy topics and translating them with practical tips to an IT enthusiast audience that is much broader than hn

Look at his comments and replies to gauge the audience for his content - deploying more privacy and security tools and knowledge can only be a good thing

Re:Mmm, Pi-hole by ryandrake on Wednesday September 26, 2018 @09:44AM (#18075821)
It’s essentially dnsmasq which can be run directly on your wireless router if you are using custom firmware. No separate hw needed, no need to horse around with dockers or containers or any of that stuff. I’d guess a lot of people are already running dnsmasq for other purposes, so adding the blocklist and periodically updating it should be trivial.
Re:Mmm, Pi-hole by windexh8er on Wednesday September 26, 2018 @10:33AM (#18076306)
I'd argue Pi-hole is quite a bit more than dnsmasq (it's actually a fork of dnsmasq called ftldns) out of the box. It's also very much more approachable by the majority and the web interface gives people immediate feedback and configurability without having to understand configurations for the services directly.

https://pi-hole.net/2018/08/06/pi-hole-v4-0-released-with-ft...

https://docs.pi-hole.net/ftldns/

Re:Mmm, Pi-hole by ryandrake on Wednesday September 26, 2018 @11:40AM (#18077058)
Interesting, didnt realize the “pi-hole” branded package was more than vanilla dnsmasq glued together with shell scripts.
Re:Mmm, Pi-hole by Spivak on Wednesday September 26, 2018 @12:13PM (#18077422)
Go back in the project history and you'll see that it originally was! It's matured a lot since then.
Re:Mmm, Pi-hole by cptskippy on Wednesday September 26, 2018 @11:05AM (#18076657)
I was doing this using Tomato and it introduced serious stability issues in the two routers (both Asus) I tried it on.

Pi-Hole is a drop in replacement to an existing network setup that doesn't require hacking your router to install a custom firmware. It will also persist router upgrades.

My only gripe with Pi-Hole, which isn't their fault really, is that power losses can quickly corrupt the Raspberry Pi's SD Card. I have my network gear on a battery backup but when I was first validating Pi-Hole I had it sitting on my desktop and managed to corrupt the SD card with power drops.

Re:Mmm, Pi-hole by jschwartzi on Wednesday September 26, 2018 @11:28AM (#18076919)
Use a different root filesystem. Ext4 is not robust against power loss, as I've discovered in multiple embedded Linux systems where Ext4 was used.

The best filesystems for robustness against power loss seem to be log-structured filesystems like YAFFS2 or QNX's ETFS. The design of the filesystem basically means that a block is never modified on flash, only obsoleted by future writes. The trade-off is that the filesystem has to be reconstructed from the raw blocks at power-on but it's incredibly robust. And the filesystem also has to be garbage-collected before additional writes can be performed. But as long as you run your filesystem below capacity this isn't a big deal.

Re:Mmm, Pi-hole by ryandrake on Wednesday September 26, 2018 @11:46AM (#18077111)
Back in the day (also before ext4) we solved this by mounting the root filesystem read-only. Depending on any other application for the machine, you may not need filesystem writes at all once it is set up. Bonus: it’s even friendlier to the flash.
Re:Mmm, Pi-hole by jschwartzi on Wednesday September 26, 2018 @06:37PM (#18080855)
This is how I've solved the problem in the past. Too bad systemd discourages this. It also doesn't protect the partition where your database and log files are kept.
Re:Mmm, Pi-hole by _emacsomancer_ on Wednesday September 26, 2018 @11:07PM (#18081879)
I'm running a Rpi with 64bit kernel & runit as init via Void Linux, so you're not necessary stuck with systemd as the only option for Rpis.
Re:Mmm, Pi-hole by freeone3000 on Wednesday September 26, 2018 @11:03PM (#18081862)
Yet another reason to not run systemd. (Also, systemd? On a router? That's excessively overkill. Why not a sane init, like SysV?)
Re:Mmm, Pi-hole by jschwartzi on Wednesday September 26, 2018 @11:19PM (#18081922)
You're assuming I make routers.
Re:Mmm, Pi-hole by _emacsomancer_ on Wednesday September 26, 2018 @11:08PM (#18081882)
Do you use YAFFS2 or ETFS on a raspberry pi? I'd be interested to know more about setting something like this up.
Re:Mmm, Pi-hole by dwater on Wednesday September 26, 2018 @01:45PM (#18078434)
I got cheap SSDs in cheap USB cases for my 2 Pis after getting annoyed with SD corruption. SSD prices have dropped recently after being flat for a long time. If you are really cheap the cases often go for $1 or free after rebate at newegg.
Re:Mmm, Pi-hole by class4behavior on Wednesday September 26, 2018 @09:51AM (#18075894)
Yeah, on openwrt you just install the adblock package

https://github.com/openwrt/packages/tree/master/net/adblock/...

Re:Mmm, Pi-hole by rdtsc on Wednesday September 26, 2018 @02:13PM (#18078710)
That is what I did. I used a TP-Link Archer C7 router and installed adblock and few other useful packages. Works like a charm so far.
Re:Mmm, Pi-hole by beagle3 on Wednesday September 26, 2018 @09:33PM (#18081554)
Do you know if it’s possible to deploy it on a virtual AP? E.g. have “MyNetwork” and “MyNetworkWithAds” - so that it is easier for nontechnical users to switch, and also doesn’t deactivate for everyone when just one user needs to (even if only for 5 mins)?
Re:Mmm, Pi-hole by class4behavior on Thursday September 27, 2018 @02:42PM (#18087440)
Possible but not that simple actually, as there is little to no documentation or shortcut for such a case available using dnsmasq. Afaik you can only realize this by running multiple instances.

The childproof network example is the fitting how-to you can learn from: https://forum.openwrt.org/t/kidsafe-or-guest-wifi-forced-saf...

Re:Mmm, Pi-hole by mistermann on Wednesday September 26, 2018 @10:04AM (#18076009)
Can anyone recommend a "2018 good choice" for a consumer router that can run custom firmware (including dnsmasq), or a trustworthy recommendation website? Wirecutter for example doesn't note third party firmware: https://thewirecutter.com/reviews/best-wi-fi-router/
Re:Mmm, Pi-hole by aurelian15 on Wednesday September 26, 2018 @11:29AM (#18076935)
Not really an off-the shelf consumer router, but since you want to install custom firmware anyways, you might want to consider the PC-Engines APU2 board [1]. You can either install any "normal" desktop x86_64 Linux distribution or a specialized router OS such as OpenWrt [2]. The AMD APU on the board supports hardware virtualisation, so you're able to run several VMs via KVM to isolate the services the router is providing.

Of course this board doesn't come with the features of a fully-fledged consumer router, such as built-in DSL/DOCSIS modem, DECT, WiFi, etc, so your mileage may vary. It comes with 3 independent Ethernet ports and 3 mPCIe slots though.

[1] http://pcengines.ch/apu2.htm [2] https://openwrt.org/toh/pcengines/apu2

Re:Mmm, Pi-hole by __david__ on Wednesday September 26, 2018 @01:02PM (#18077970)
I second this. I've been running PC engines stuff for a few years and it's great. I currently have an APU and it handles my gigabit fiber no problem. I use a separate off-the-shelf wireless router in bridge mode which let's me upgrade that independent of the PC engines (wireless hardware tech moves faster than router hardware tech).

I run openwrt on it and use the "adblock" package which works like pi-hole (minus the nice web stats). Having it be a plain x86 CPU is nice—For example, I compiled Telegraf on my local Linux machine (since openwrt doesn't have a package for it) and was able to just drop it on with minimal problems.

Re:Mmm, Pi-hole by Arbalest on Wednesday September 26, 2018 @08:05PM (#18081280)
Unfortunately it does not come with 3 mPCIe slots, the one furthest to the left is an mSATA port.
Re:Mmm, Pi-hole by givinguflac on Wednesday September 26, 2018 @10:34AM (#18076323)
I’ve been running the mid to high end Asus routers for years now and am very happy with them. Running wrt-Merlin firmware and AB-Solution via entware is everything I need and doesn’t complicate things with additional devices like pi-hole.
Re:Mmm, Pi-hole by ryandrake on Wednesday September 26, 2018 @11:35AM (#18076989)
Yes, this is my preference as well. You can also run a vpn with this setup (as you can with other custom firmwares) so you can take advantage of this adblocking from outside your home.
Re:Mmm, Pi-hole by ronjouch on Thursday September 27, 2018 @08:02AM (#18083653)
The TP-Link Archer C7 AC1750. https://openwrt.org/toh/tp-link/archer-c5-c7-wdr7500

I was looking for an openwrt-compatible router a few weeks ago, this is 2018's consensual cheap & able & easy-to-install router. It's easily the most frequently recommended home router for openwrt these days. And yes, openwrt's Adblock package is awesome.

And to come back to your original question, to do your own research, I recommend you search/ask on https://www.reddit.com/r/openwrt/ and https://forum.openwrt.org/ , it's a question that pops up frequently.

Re:Mmm, Pi-hole by wsy on Wednesday September 26, 2018 @10:51AM (#18076512)
Netgear R7800 and any other router with the same Qualcomm chipset work great with OpenWRT.

Take care that the router has a boot mode which allows you to overwrite the firmware via TFTP. That comes in handy in case of trouble with a particular firmware version (e.g., router stuck in a boot loop).

Re:Mmm, Pi-hole by windexh8er on Wednesday September 26, 2018 @10:28AM (#18076258)
https://openwrt.org/toh/views/toh_available_864

edit: link to OpenWRT with a list of supported hardware that is relevant to the parent's question

Re:Mmm, Pi-hole by creeble on Wednesday September 26, 2018 @10:27AM (#18076248)
I buy my routers from flashrouters.com. A little overpriced, but I trust them and their testing. I have the Asus N16rt (I think) running shibby tomato and it's great.

Despite this, I run pi-hole on an RPi that I have done so much as a reboot on in two years.

Re:Mmm, Pi-hole by tombrossman on Wednesday September 26, 2018 @03:08PM (#18079248)
It may be more full-featured than you are looking for, but have a look at the Turris Omnia. It is extremely customisable and you can add an internal SSD to run LXC containers on (including one running Pi-hole, which is what I do).

Not cheap, and sometimes unforgiving if you don't know exactly what you are doing, but worth every penny in my opinion.

https://omnia.turris.cz/en/

Re:Mmm, Pi-hole by voltagex_ on Wednesday September 26, 2018 @08:02PM (#18081269)
Have you had any issues with the auto updater? I got rid of my Omnia after an auto-update broke DNS while I was away from home.

Ironically, went to Unifi after reading Troy's blogs about it - now regretting it immensely as the hardware is nowhere near as powerful as the Omnia.

Re:Mmm, Pi-hole by tombrossman on Thursday September 27, 2018 @03:46PM (#18087925)
This happened to me too, and what I learned is that the Omnia uses the Knot DNS resolver, which re-enables itself after updates and this breaks everything if you have made certain customisations.

The fix is to disable this with "echo 'Uninstall("knot-resolver", { priority = 60 })' >> /etc/updater/conf.d/user.lua" over SSH so it stays disabled. You can do this for any service you modified or disabled, and the documentation barely mentions this (it's a real showstopper bug until you diagnose it - no connectivity whatsoever).

Re:Mmm, Pi-hole by kdot on Wednesday September 26, 2018 @10:30AM (#18076275)
I’ve been also searching for recommendations, particularly on a custom firmware router that allows me to host a VPN server.
Re:Mmm, Pi-hole by paxswill on Wednesday September 26, 2018 @09:17PM (#18081517)
It’ll be more involved for you to set up, but pfSense is what I use. I basically forget it’s there until I want to change something (add a new VPN user, monitor bandwidth usage). I’ve set up an IPSec VPN that works well with my Apple devices, especially with a configuration profile that enables on demand VPN (connect via VPN when certain conditions are met, like not on my home WiFi). For hardware I use a cheapish “industrial” computer from AliExpress. Probably not the best thing security-wise (no firmware updates in the past few years, it feels like it’s just shipped directly from a random factory in China), but it’s been great so far.
Re:Mmm, Pi-hole by pdimitar on Thursday September 27, 2018 @06:34PM (#18089439)
How do you instruct an iPhone or iPad to use VPN when you are not connected to your home Wi-Fi? I used their former Workflow automation app (now dubbed Shortcuts in iOS12) and it did allow reacting to such an event (going out of range of 1 or more wi-fi networks) but did not realize one of the possible actions was to be able to enable VPN.

Was that what you used? Or was it something else?

Re:Mmm, Pi-hole by user812 on Wednesday September 26, 2018 @10:35AM (#18076330)
And Hacker News is essentially just a bit of HTML, CSS and lots of words.
Re:Mmm, Pi-hole by _emacsomancer_ on Wednesday September 26, 2018 @11:05PM (#18081874)
Re:Mmm, Pi-hole by copperx on Wednesday September 26, 2018 @10:53AM (#18076538)
Assuming I'm only interested in blocking ads in one computer, is there a software solution for this on Linux or Windows? (I know that Mac has Little Snitch).
Re:Mmm, Pi-hole by clear_dg on Wednesday September 26, 2018 @04:00PM (#18079690)
Why not use a browser extension? uBlock Origin is pretty good from what I hear. I use uMatrix by the same dev, and it serves me well. Both work on major browsers (FF, Chrome, Opera, etc..).
Re:Mmm, Pi-hole by jwilk on Wednesday September 26, 2018 @10:39AM (#18076378)
> DoH or DoT

I wasn't familiar with these terms and they are a bit ungooglable. :-/

DoH = DNS-over-HTTPS

DoT = DNS-over-TLS

Re:Mmm, Pi-hole by andreasvc on Wednesday September 26, 2018 @09:59AM (#18075968)
The simplest approach is to use a hosts file: https://someonewhocares.org/hosts/
Re:Mmm, Pi-hole by briffle on Wednesday September 26, 2018 @10:01AM (#18075989)
That doesn't work the same as pihole. PiHole blocks ads on ALL devices on your network. Your computer, your laptop, your phone, your kids kindle, etc. As long as they are on your network, they are protected (and browsing web pages on an older phone, things are much faster)
Re:Mmm, Pi-hole by andreasvc on Wednesday September 26, 2018 @10:21AM (#18076195)
Yup, that's a downside. The advantage is that it's much simpler and will also work when you're not on your home network.
Re:Mmm, Pi-hole by daxorid on Wednesday September 26, 2018 @10:43AM (#18076427)
You can also run pi-hole on a tiny VPS and set your DNS statically on all devices.
Re:Mmm, Pi-hole by LynxInLA on Wednesday September 26, 2018 @03:20PM (#18079340)
do you have any links for doing this?
Re:Mmm, Pi-hole by spurgu on Wednesday September 26, 2018 @04:09PM (#18079777)
Yeah this is something I've been thinking about lately as well. Pi-Hole seems cool but what about most of the time when I'm somewhere else than my local network?
Re:Mmm, Pi-hole by badbug on Wednesday September 26, 2018 @11:00AM (#18076621)
How do I edit the hosts file on my iPhone?
Re:Mmm, Pi-hole by 8_hours_ago on Wednesday September 26, 2018 @01:54PM (#18078525)
I use AdBlock https://www.adblockios.com on iOS which runs a local DNS server that can blackhole domains. It doesn't work well on very large host files so I gave up trying to import https://github.com/StevenBlack/hosts, but it does work well for smaller lists.
Re:Mmm, Pi-hole by pdimitar on Thursday September 27, 2018 @07:09PM (#18089674)
Probably not the answer you are looking for but:

(1) Install "1Blocker X" -- not free but it's cheap. (2) It has a huge number of rules and protects your Safari pretty damn good. (3) You can disable the existing rules if you so choose. (4) You can add new ones based on URL regexes or CSS rules.

I am still using it actively both on my iPhone and iPad, one of the best investment in apps I ever did.

Re:Mmm, Pi-hole by qpalz on Wednesday September 26, 2018 @11:23AM (#18076870)
Jailbreak it, install openssh, ssh in and edit /etc/hosts. There's also packages in Cydia that add adblock lists to your hosts for you.
Re:Mmm, Pi-hole by mirceal on Wednesday September 26, 2018 @11:13AM (#18076745)
You fire up vi and load /etc/hosts /s
Re:Mmm, Pi-hole by FroshKiller on Wednesday September 26, 2018 @10:41AM (#18076404)
Well, I'm connected to my home network via VPN when I'm not on my home network, so....
Re:Mmm, Pi-hole by SamuelAdams on Wednesday September 26, 2018 @01:04PM (#18077992)
There's also Steven Black's host file:

https://github.com/StevenBlack/hosts

Re:Mmm, Pi-hole by unethical_ban on Wednesday September 26, 2018 @02:26PM (#18078845)
The issue with that is DNS resolution. I noticed that when I disconnect/reconnect my interface, it took >30 seconds for DNS resolution to properly resolve. Why? Because I was using a 65,000 entry host file on my modern Windows 10 machine.

It seems to only impact during NIC changes, but I VPN and was moving my computer enough that it was causing me issue.

I'd rather have a separate service to run it.

Re:Mmm, Pi-hole by baud147258 on Thursday September 27, 2018 @06:21AM (#18083254)
I also had a performance problem with DNS resolution with a big host file, but disbling the DNS client service helped.
Re:Mmm, Pi-hole by Tomte on Wednesday September 26, 2018 @10:07AM (#18076033)
Of course I have deployed it on a Raspberry. I don't have another always-on computer, and while it's not the only supported target, it is the one most Pi-Hole users have, so I get maximum community support.

I'm doubting whether electricity cost might be too high (it's getting mighty warm), but I haven't measured it, yet.

So far, I love my Pi-Hole. Absolutely no problems with it.

Re:Mmm, Pi-hole by TheSmiddy on Wednesday September 26, 2018 @10:36AM (#18076342)
At 100% power draw the charger I use to power my pi uses 5 watts so you're pretty safe on the power.
Re:Mmm, Pi-hole by lostlogin on Wednesday September 26, 2018 @02:11PM (#18078688)
A cron job every hour with a slack notification of temp >60C has put me at ease. It goes over occasionally so I suppose I’ll need a fan at some point.
Re:Mmm, Pi-hole by pbhjpbhj on Wednesday September 26, 2018 @12:01PM (#18077297)
On an RPi I can plug it in to the USB on my router for power and connect with ethernet. Otherwise I have to run a full powered server perpetually to manage DNS for the home network. Made sense to me.

I stopped using it as mine was seemingly hacked (100,000 lookups or so in a short time, presumably some sort of page-impression generation?) and I hadn't the time to trace if it was a problem with the project or not.

Re:Mmm, Pi-hole by lostlogin on Wednesday September 26, 2018 @02:09PM (#18078669)
And if you’re that way inclined, a POE Pi hat can get another cable removed.
Re:Mmm, Pi-hole by voltagex_ on Wednesday September 26, 2018 @08:04PM (#18081274)
Re:Mmm, Pi-hole by lostlogin on Wednesday September 26, 2018 @09:30PM (#18081551)
I wasn’t aware of that - thanks. I think I’ll be safe as there will be no peripherals plugged in, but that’s something that needs considering it seems.
Re:Mmm, Pi-hole by voltagex_ on Wednesday September 26, 2018 @09:55PM (#18081638)
I've gone the route of using another box to do PoE -> 5V USB, but unfortunately the TP-Link converter is outputting 4.8V instead of 5V (the Pi3b will technically run on this, but it's not a good idea).
Re:Mmm, Pi-hole by bogomipz on Wednesday September 26, 2018 @10:33AM (#18076313)
Thanks for the link. I guessing this would handle the use case of being able to acess Pi-Hole while traveling or in a coffee shop correct? This seems to be a limitation of having this on a Pi.
Re:Mmm, Pi-hole by mianos on Wednesday September 26, 2018 @05:51PM (#18080580)
The setup script runs perfectly on Ubuntu in an lxd container as well.
Re:Mmm, Pi-hole by thatcat on Wednesday September 26, 2018 @12:01PM (#18077291)
I assume DoH is dns over http, what is DoT?
Re:Mmm, Pi-hole by mjy78 on Wednesday September 26, 2018 @09:46PM (#18081608)
DNS over TLS