summaryrefslogtreecommitdiff
path: root/nonprism/dhcpcd-hardened-script
diff options
context:
space:
mode:
Diffstat (limited to 'nonprism/dhcpcd-hardened-script')
-rw-r--r--nonprism/dhcpcd-hardened-script/PKGBUILD16
-rw-r--r--nonprism/dhcpcd-hardened-script/dhcp-hardened-script.service0
-rw-r--r--nonprism/dhcpcd-hardened-script/dhcpcd_hardened.sh6
3 files changed, 22 insertions, 0 deletions
diff --git a/nonprism/dhcpcd-hardened-script/PKGBUILD b/nonprism/dhcpcd-hardened-script/PKGBUILD
new file mode 100644
index 000000000..a8467fbc5
--- /dev/null
+++ b/nonprism/dhcpcd-hardened-script/PKGBUILD
@@ -0,0 +1,16 @@
+# Maintainer: Luke R. <g4jc@openmailbox.org> GPG: rsa4096/3EAE8697
+
+pkgname=dhcpcd-hardened-script
+pkgver=0.1
+pkgrel=1
+pkgdesc="Removes Hostname and resets DUID to prevent DHCP leaks on the network"
+arch=(any)
+license=(GPL2)
+depends=('dhcpcd')
+source=('dhcpcd_hardened.sh')
+sha512sums=('70e9e4faa87cf258f5d47ce56a7b7d439e0dd9e59ab7d2be2790fcc55342c05a321e4d7e06b8a0ae30ed2575b2a62843d167e93aba9de5cbb9e2034bce0a71ed')
+whirlpoolsums=('753e1931978c3168acf93a92f9d1050dec4ba4fb9bf6dc76280c6a6bfeef8f09cc371501e7d34d83c013a800155466135cf24159b06258cde60ae7c871d0fb5e')
+
+package() {
+ install -Dm755 dhcpcd_hardened.sh "$pkgdir"/usr/lib/dhcpcd/dhcpcd_hardened.sh
+}
diff --git a/nonprism/dhcpcd-hardened-script/dhcp-hardened-script.service b/nonprism/dhcpcd-hardened-script/dhcp-hardened-script.service
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/nonprism/dhcpcd-hardened-script/dhcp-hardened-script.service
diff --git a/nonprism/dhcpcd-hardened-script/dhcpcd_hardened.sh b/nonprism/dhcpcd-hardened-script/dhcpcd_hardened.sh
new file mode 100644
index 000000000..82f1b4dd0
--- /dev/null
+++ b/nonprism/dhcpcd-hardened-script/dhcpcd_hardened.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+# This script wipes hostname and DUID so that DHCP can't send it over the network
+hostnamectl set-hostname localhost
+sed -i '/127.0.0.1/c\127.0.0.1 localhost.localdomain localhost 'localhost'' /etc/hosts ##properly sets our new host in /etc/hosts file
+hostname localhost ##avoids need to reboot before showing our new hostname in terminals etc.
+rm -rf /etc/dhcpcd.duid # Delete DUID