summaryrefslogtreecommitdiff
path: root/nonprism/dhcpcd-hardened-script/dhcpcd_hardened.sh
diff options
context:
space:
mode:
authorGaming4JC <g4jc@openmailbox.org>2017-01-07 00:32:46 -0500
committerGaming4JC <g4jc@openmailbox.org>2017-01-07 00:32:46 -0500
commitd1925892f9d755b264f1594023458c229939b7fd (patch)
treeb810b81558fef8803b01f2aa6d47f5967876313a /nonprism/dhcpcd-hardened-script/dhcpcd_hardened.sh
parent09ee61240a3feada31bf008f506df4917db8d34a (diff)
downloadabslibre-d1925892f9d755b264f1594023458c229939b7fd.tar.gz
abslibre-d1925892f9d755b264f1594023458c229939b7fd.tar.bz2
abslibre-d1925892f9d755b264f1594023458c229939b7fd.zip
dhcpcd-hardened-script
Diffstat (limited to 'nonprism/dhcpcd-hardened-script/dhcpcd_hardened.sh')
-rw-r--r--nonprism/dhcpcd-hardened-script/dhcpcd_hardened.sh6
1 files changed, 6 insertions, 0 deletions
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