mirror of
https://github.com/konstruktoid/hardening.git
synced 2026-04-26 01:05:56 +03:00
[GH-ISSUE #60] DNS Service #27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @roobyz on GitHub (Feb 4, 2020).
Original GitHub issue: https://github.com/konstruktoid/hardening/issues/60
You've done some great work.
Sorry if this goes beyond your original intent of your hardening scripts. I'm trying to harden a server that is running Pihole. After running your process, the DNS Service (dnsmasq) gets completely disabled somehow and prevents Pihole from working. Also, Pihole uses php7.4-fpm, which leverages a run folder (/run/php) that also disappears after hardening.
Could you point me in the right direction on debugging the part of your process "over hardens"? :)
Thanks in advance!!
@konstruktoid commented on GitHub (Feb 4, 2020):
Hi @roobyz, thank you and sorry for any inconvenience this has caused.
On which platform and version are you running Pihole? (I've only tried it on a RaspberryPi).
@roobyz commented on GitHub (Feb 4, 2020):
Oh yes.... Ubuntu 18.04 running on an LXC container (AMD x86_.64). Most everything works great, but there are a few functions that don't apply or don't work correctly on LXC containers that I've had to disable. This one isn't as obvious to me. :-)
@konstruktoid commented on GitHub (Feb 5, 2020):
Hi again @roobyz, I've updated the script so it hopefully won't fail as much when running in a LXC, feel free to test.
Had no issues running Pihole; I created the LXC, ran the hardening script, and then installed Pihole.
Could you please update with some logs?
@roobyz commented on GitHub (Feb 6, 2020):
Super cool. I'll test tonight. FYI, I created a similar variable LXC as a one-liner like:
@roobyz commented on GitHub (Feb 6, 2020):
@konstruktoid I ran the updated code. It was successful, "in part". :-)
I used LXC with Pihole already installed, and ran the hardening script. Afterward I repaired Pihole (pihole -r), and everything seemed to work. However after restarting my VPS, it stopping working. I had to also fix php7.4-fpm (missing /run/php folder), so I ran:
At this point I end up with Pihole with a message like "Lost API connection" on the Pihole page. Running
pihole statusgives:However, trying
pihole restartdnsdoesn't do anything.Also, question regarding
17_packages, wondering why you didn't do something like:The attached log as requested:
hardening-script-200206.log
@konstruktoid commented on GitHub (Feb 6, 2020):
Thanks, will have a look.
@konstruktoid commented on GitHub (Feb 6, 2020):
It seems
Piholedoesn't configure a dnsmasq systemd service, and after running the script you'll probably need to reinstall dnsmasq.So my suggestion is that you (re)install dnsmasq, create a dnsmasq.service file and disable systemd-resolved.
systemctl disable systemd-resolved.service/etc/systemd/system/dnsmasq.service:But where does
php7.4-fpmcome from?@konstruktoid commented on GitHub (Feb 17, 2020):
any progress @roobyz ?
@konstruktoid commented on GitHub (Mar 30, 2020):
Closing due to inactivity.