dhcpcd_hardened.sh 417 B

12345678910
  1. #!/bin/sh
  2. # This script wipes hostname and DUID so that DHCP can't send it over the network
  3. echo 'hostname="localhost"' > /etc/conf.d/hostname
  4. # Properly sets our new host in /etc/hosts file
  5. sed -i '/127.0.0.1/c\127.0.0.1 localhost.localdomain localhost 'localhost'' /etc/hosts
  6. # Avoids need to reboot before showing our new hostname in terminals, etc
  7. hostname localhost
  8. # Delete DUID
  9. rm -rf /etc/dhcpcd.duid