Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
redhat:ip-address-services-redhat:configure-bind-with-adblocking-redhat [2017/09/29 15:40] – [Let's Get Started!] michael | redhat:ip-address-services-redhat:configure-bind-with-adblocking-redhat [2018/05/16 11:08] (current) – [Let's Get Started!] michael | ||
---|---|---|---|
Line 142: | Line 142: | ||
'' | '' | ||
- | Down toward the end of the file I have two examples of how to manually add DNS records (A records). Just use this same format if you want to add any of your own. The bottom line is for creating a CNAME record for dns, and pointing it to my server named dns01. If this server is not named dns01 for you, replace dns01 with the correct name. Now if you ever go back and update this file (which is normal), update the serial (line 3) so named will know to reread this file since it's been updated. The serial is 10 digits, and is best used in a date format (i.e., YYYYMMDDVV, where Y=Year, M=Month, D=Day, V=Version). Just restart the named service after changes have bene made. | + | Down toward the end of the file I have two examples of how to manually add DNS records (A records). Just use this same format if you want to add any of your own. The bottom line is for creating a CNAME record for dns, and pointing it to my server named dns01. If this server is not named dns01 for you, replace dns01 with the correct name. |
+ | |||
+ | Now if you ever go back and update this file (which is normal), update the serial (line 3) so named will know to reread this file since it's been updated. | ||
+ | |||
+ | The serial is 10 digits, and is best used in a date format | ||
</ | </ | ||
+ | |||
+ | <WRAP center | ||
+ | ==== Herunterladen des AD-Blacklist Zonen Files ==== | ||
+ | '' | ||
+ | |||
+ | < | ||
+ | # wget -O / | ||
+ | </ | ||
+ | |||
+ | |||
+ | <WRAP center | ||
+ | ==== Konfiguration des DNS lokalen HTTPD ==== | ||
+ | |||
+ | < | ||
+ | |||
+ | Above we downloaded the 1x1 transparent gif file that we'll serve up instead of ads. Next we need to update the httpd config with rewrite rules to know when/how to serve the file. We need to open the file for editing, and just add in a few lines inside the < | ||
+ | |||
+ | < | ||
+ | |||
+ | <sxh bash;>< | ||
+ | Header set Cache-Control " | ||
+ | </ | ||
+ | |||
+ | RewriteEngine On | ||
+ | RewriteBase / | ||
+ | RewriteCond %{REQUEST_FILENAME} !-f | ||
+ | RewriteCond %{REQUEST_FILENAME} !-d | ||
+ | RewriteCond %{REQUEST_FILENAME} !-l | ||
+ | RewriteRule ^(.*)$ http:// | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | <WRAP center | ||
+ | ==== Konfiguration Firewalld, sowie Starten und enablen der Services ==== | ||
+ | |||
+ | < | ||
+ | # firewall-cmd --permanent --add-port=53/ | ||
+ | # firewall-cmd --permanent --add-port=53/ | ||
+ | # firewall-cmd --permanent --add-service=http | ||
+ | # firewall-cmd --reload | ||
+ | |||
+ | # systemctl reboot | ||
+ | </ | ||
+ | |||
+ | From here you just need to configure your client computer to use this server as it's DNS server, and you should then be ad free! If it's not working right, or you're having problem, just me know and I'd be glad to help out! | ||
+ | |||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | '' | ||