0473.html 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Install Pi-Hole on Raspberry Pi 4</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="Network Wide Ad Blocking,Pi-Hole,Raspberry Pi 4,Install Pi-Hole Raspberry Pi,DNS,Ad Blocking,Raspberry Pi,RPi,Linux,Ad Blocker,Pi Hole,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Install Pi-Hole on Raspberry Pi 4">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  12. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  13. <script type="text/javascript" src="includes/js/steps.js"></script>
  14. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  15. </head>
  16. <body>
  17. <div id="gridContainer">
  18. <div class="topMargin"></div>
  19. <div id="listName" class="topMargin">
  20. <h1>Install Pi-Hole on Raspberry Pi 4</h1>
  21. </div>
  22. <div></div>
  23. <div id="content">
  24. <h2>Installing Pi-Hole</h2>
  25. <ol>
  26. <li>Log into the Raspberry Pi</li>
  27. <li>Run the following commands in a terminal window
  28. <div class="codeBlock"># update software repositories<br />
  29. sudo apt update<br />
  30. # install available software updates<br />
  31. sudo apt upgrade -y<br />
  32. # clean up downloaded apt files<br />
  33. sudo apt clean<br />
  34. # install pi-hole<br />
  35. curl -sSL https://install.pi-hole.net | bash</div>
  36. </li>
  37. <li>Press Enter until the DNS selection is displayed</li>
  38. <li>Select a DNS provider and press Enter</li>
  39. <li>Press Enter through the rest of the Pi-Hole installer, selecting the defaults</li>
  40. <li>Copy the randomly generated admin password (just in case)</li>
  41. <li>Press Enter to complete the installation</li>
  42. <li>Run the following command to change the Pi-Hole admin password
  43. <div class="codeBlock">sudo pihole -a -p</div>
  44. </li>
  45. <li>Enter and confirm the new password</li>
  46. <li>Open a web browser and navigate to http://localhost/admin to view the pi-hole admin interface</li>
  47. </ol>
  48. <h2>Testing Pi-Hole</h2>
  49. <ol>
  50. <li>Back in the terminal, run the following commands to use the local pi-hole instance for DNS
  51. <div class="codeBlock">sudo nano /etc/resolv.conf</div>
  52. </li>
  53. <li>Add the following line at the top of the other nameservers
  54. <p>nameserver 127.0.0.1</p>
  55. </li>
  56. <li>Press CTRL+O, Enter, CTRL+X to write the changes to resolv.conf</li>
  57. <li>Back in the web browser, open a new tab and navigate to a site that contains ads, like https://yahoo.com</li>
  58. <li>Watch the Pi-Hole interface to see the ads being blocked</li>
  59. </ol>
  60. </div>
  61. </div>
  62. </body>
  63. </html>