0593.html 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <title>Running Pi-Hole Ad-Blocker in a Proxmox VE LXC Linux Container [CT]</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  6. <meta charset="UTF-8">
  7. <meta name="keywords" content="Proxmox,Linux,Container,LXC,CT,Pi-Hole,Ad Blocking,Ad Blocker,DNS,Self-Hosted,Home Lab,Ad,Block,How To,Tutorial,i12bretro">
  8. <meta name="author" content="i12bretro">
  9. <meta name="description" content="Running Pi-Hole Ad-Blocker in a Proxmox VE LXC Linux Container [CT]">
  10. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  11. <meta name="revised" content="06/18/2022 06:39:23 AM" />
  12. <link rel="icon" type="image/x-icon" href="includes/favicon.ico">
  13. <script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
  14. <script type="text/javascript" src="includes/js/steps.js"></script>
  15. <link href="css/steps.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="gridContainer">
  19. <div class="topMargin"></div>
  20. <div id="listName" class="topMargin">
  21. <h1>Running Pi-Hole Ad-Blocker in a Proxmox VE LXC Linux Container [CT]</h1>
  22. </div>
  23. <div></div>
  24. <div id="content">
  25. <h2>Creating the Container</h2>
  26. <ol>
  27. <li>Log into the Proxmox VE web UI</li>
  28. <li>Select a storage device from the left navigation that allows storing Container templates</li>
  29. <li>Select CT Templates from the left sub-navigation menu</li>
  30. <li>Click the Templates button</li>
  31. <li>Search for core &gt; Click TurnKey Core to select it &gt; Click the Download button</li>
  32. <li>After the download completes, close the download dialog</li>
  33. <li>Right click the Proxmox node name &gt; Create CT</li>
  34. <li>Enter the Hostname PiHole, Password and Confirm the password &gt; Next</li>
  35. <li>Select the Storage where the container template was downloaded and select the TurnKey Core container template &gt; Click Next</li>
  36. <li>Set the Storage device to save the container to &gt; Click Next</li>
  37. <li>Leave the defaults on the CPU tab &gt; Next</li>
  38. <li>On the Memory tab, set the Memory to 1024 &gt; Next</li>
  39. <li>Leave the defaults on the Network tab, setup a static IP address if needed (I prefer to set this from my router) &gt; Next</li>
  40. <li>Leave the defaults on the DNS tab &gt; Next</li>
  41. <li>Verify the summary and click Finish</li>
  42. <li>After the container creation completes, close the download dialog</li>
  43. <li>Right click the PiHole container in the left navigation pane &gt; Start</li>
  44. <li>Click console in the left sub-navigation menu</li>
  45. </ol>
  46. <h2>Installing Updates and Pi-Hole</h2>
  47. <ol>
  48. <li>Log into the container with the username root and the password set during the setup</li>
  49. <li>On the Initialize Hub services dialog, press tab and select Skip &gt; Press Enter</li>
  50. <li>On the System Notifications dialog, press tab and select Skip &gt; Press Enter</li>
  51. <li>On the Security updates dialog, press tab to select Install to enable automatic updates or Skip &gt; Press Enter</li>
  52. <li>Press Enter to select Advanced Menu</li>
  53. <li>Arrow down and select Quit &gt; Press Enter &gt; Select Yes to confirm &gt; Press Enter</li>
  54. <li>Run the following commands to install updates
  55. <div class="codeBlock CMD"># update software repositories<br />
  56. apt update<br />
  57. # install available software updates<br />
  58. apt upgrade -y<br />
  59. # clean apt cache<br />
  60. apt clean<br />
  61. # reboot the container<br />
  62. reboot now</div>
  63. </li>
  64. <li>Log back into the container</li>
  65. <li>Run the following command to install Pi-Hole
  66. <div class="codeBlock CMD">curl -sSL https://install.pi-hole.net | bash</div>
  67. </li>
  68. <li>Press Enter until the DNS selection is displayed</li>
  69. <li>Select a DNS provider and press Enter</li>
  70. <li>Press Enter through the rest of the Pi-Hole installer, selecting the defaults</li>
  71. <li>Copy the randomly generated admin password (just in case)</li>
  72. <li>Press Enter to complete the installation</li>
  73. <li>Run the following command to change the Pi-Hole admin password
  74. <div class="codeBlock CMD">pihole -a -p</div>
  75. </li>
  76. <li>Enter and confirm the new password</li>
  77. <li>Click the Applications button &gt; Internet &gt; Chromium Web Browser</li>
  78. <li>Navigate to http://DNSorIP/admin</li>
  79. <li>Click Login</li>
  80. <li>Authenticate with the admin password</li>
  81. </ol>
  82. <h2>Testing Pi-Hole From Windows Client</h2>
  83. <ol>
  84. <li>Click the Start button &gt; Type control panel &gt; press Enter</li>
  85. <li>Click View By &gt; Small Icons</li>
  86. <li>Click Network and Sharing Center</li>
  87. <li>Click Change adapter settings</li>
  88. <li>Right click on the network connection &gt; Properties</li>
  89. <li>Select Internet Protocol Version 4 (TCP/IPv4) &gt; Properties</li>
  90. <li>Select the radio option next to Use the following DNS server addresses</li>
  91. <li>Input the IP address of the Pi-Hole VM</li>
  92. <li>Click OK on both of the open dialog windows</li>
  93. <li>Right click the Start button &gt; Command Prompt (Admin)</li>
  94. <li>Type the following commands to flush your DNS cache and restart the network connections (note: your network connection will drop if running the commands on a remote machine)
  95. <div class="codeBlock">ipconfig /flushdns<br />
  96. ipconfig /release<br />
  97. ipconfig /renew</div>
  98. </li>
  99. </ol>
  100. <p>More on Pi-Hole <a href="https://pi-hole.net/" target="_blank">https://pi-hole.net/</a></p>
  101. </div>
  102. </div>
  103. </body>
  104. </html>