Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| sailing:adblock [2024/01/09 10:08] – willy | sailing:adblock [2024/02/22 09:48] (current) – removed willy | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Blocking Ads ====== | ||
| - | |||
| - | Nobody like ads, let's be real. Also, ads are a security risk since they can deliver malware or force the users to tap on stuff they shouldn' | ||
| - | |||
| - | I am using [[https:// | ||
| - | |||
| - | Install it: | ||
| - | <code bash> | ||
| - | > emerge dnsmasq | ||
| - | </ | ||
| - | |||
| - | and edit your config file **/ | ||
| - | < | ||
| - | addn-hosts=/ | ||
| - | </ | ||
| - | |||
| - | The more complex way is to populate that file, which is a standard //hosts// file, so in the format: | ||
| - | < | ||
| - | 0.0.0.0 ads.google.com | ||
| - | </ | ||
| - | where the trick is mapping all ads servers to invalid addresses like 0.0.0.0. | ||
| - | |||
| - | There are some good adblock lists here: | ||
| - | |||
| - | |||
| - | And this command will download and properly format it: | ||
| - | <code bash> | ||
| - | curl " | ||
| - | </ | ||
| - | |||
| - | All you need to do now is add to //crontab// for automatic updates, add a line like: | ||
| - | < | ||
| - | 0 4 * * * root curl " | ||
| - | </ | ||
| - | |||
| - | to your | ||
| - | <code bash> | ||
| - | > crontab -e | ||
| - | </ | ||
| - | |||
| - | == | ||
| - | (content of this page has been inspired a lot by [[https:// | ||
| - | |||