@@ -115,7 +115,7 @@ any meta layers that might have them.
115
115
> parse the available recipes within your working tree to see if a component
116
116
> is available to call. However, I find it to be a bit verbose, so I rarely
117
117
> use it. Feel free to experiment by sourcing ` oe-init-build-env ` and then
118
- > doing something like ` bitbake-layers show-recipes | grep <component> `
118
+ > doing something like ` bitbake-layers show-recipes | grep <component> ` .
119
119
120
120
The first place you should always visit when seeing if recipes exist is the
121
121
[ Layer Index] ( https://layers.openembedded.org/layerindex/branch/master/layers/ ) .
@@ -215,7 +215,7 @@ dependencies and add them to the recipe. At least not at the time of writing
215
215
this blog post.
216
216
217
217
The exact area you want to look at is `LAYERDEPENDS` in the `layer.conf` file.
218
- You can see it requires the `core` layer (itself ), the `openembedded` layer,
218
+ You can see it requires the `core` layer (`meta` ), the `openembedded` layer,
219
219
and the `meta-python` layer.
220
220
221
221
To automatically add everything we need, type the following while inside the
@@ -297,7 +297,7 @@ touch recipes-example/dnsmasq-config/files/blocked.list
297
297
Populate the ` blocked.list` with the following:
298
298
299
299
` ` ` sh
300
- # This file is your blocked list where websites go to DNS la la land
300
+ # This file is your blocked list where websites go to DNS La La Land
301
301
# Redirect your most hated, least trusted websites to 127.0.0.1 like shown:
302
302
127.0.0.1 doubleclick.net
303
303
127.0.0.1 ads.facebook.com
@@ -337,8 +337,8 @@ need to make is to have `dnsmasq` look for our newly created `blocked.list`.
337
337
In the [` dnsmasq.conf.example` ](https://github.com/imp/dnsmasq/blob/master/dnsmasq.conf.example#L141),
338
338
there exists a ` addn-hosts` section where you can tell ` dnsmasq` to look at
339
339
another file besides just ` /etc/hosts` . We want this because we want ` dnsmasq`
340
- to look at our custom ` blocked.list` file, so we need to uncomment this.
341
- We also need to make sure we log all ` nslookup` entries to a file.
340
+ to look at our custom ` blocked.list` file, so we need to uncomment this line .
341
+ We also need to make sure to log all ` nslookup` entries to a file.
342
342
We can do all of this with a ` .bbappend` , so let' s create it:
343
343
344
344
```sh
@@ -435,8 +435,9 @@ arsort($domainCounts);
435
435
436
436
// Limit top domains shown
437
437
// NOTE: We will use CDNs here. In a truly embedded system, we would be
438
- // placing these files on the disk somewhere and reading from them so we could
439
- // guarantee they would always work with our packaged system.
438
+ // placing these files on the rootfs somewhere and reading from them so we
439
+ // could guarantee they would always work with our packaged system even when
440
+ // disconnected from the internet.
440
441
$topDomains = array_slice($domainCounts, 0, 10, true);
441
442
?>
442
443
<!DOCTYPE html>
@@ -574,7 +575,8 @@ do_install:append() {
574
575
> ` cgi.fix_pathinfo = 1` to it. I found this wasn' t necessary. However, if you
575
576
> would like to add it, I found `php-cgi` will see it if you place it in the
576
577
> `/usr/bin` directory. Feel free to create a recipe that creates this file and
577
- > places it in that directory if you' d like.
578
+ > places it in that directory if you' d like. You can place a ` php_%.bbappend`
579
+ > in ` recipes-devtools/php` in the ` meta-bbb` layer.
578
580
579
581
# ## 7. Building
580
582
@@ -586,14 +588,16 @@ bitbake mycustom-image
586
588
` ` `
587
589
588
590
If everything was successful, you should have a ` .wic` located in the ` tmp`
589
- directory as mentioned in previous tutorials.
591
+ directory as mentioned in previous tutorials. Write this to a MicroSD card
592
+ using any of the previous techniques we mentioned in past tutorials.
590
593
591
594
# # Testing the DNS Sinkhole
592
595
593
- Insert the MicroSD card, boot, and login. Look up what the IP address is by
594
- typing ` ifconfig` and looking at what IP address the BeagleBone Black is
595
- currently set to. On your machine that is connected to the same network as the
596
- BBB, navigate to ` http://< BBB-IP-ADDRESS> /index.php` . You should see:
596
+ Insert the MicroSD card, boot, and login using ` root` with no password.
597
+ Look up what the IP address is by typing ` ifconfig` and looking at what IP
598
+ address the BeagleBone Black is currently set to. On your machine that is
599
+ connected to the same network as the BBB, navigate to
600
+ ` http://< BBB-IP-ADDRESS> /index.php` . You should see:
597
601
598
602
! [Landing Page](/assets/img/2024-12-15/dns-sinkhole-opening-page.png)
599
603
@@ -620,7 +624,7 @@ and you should see this:
620
624
621
625
! [Blocked](/assets/img/2024-12-15/dns-sinkhole-blocked.png)
622
626
623
- As you continue to attempt to navigate to these sites , this website will
627
+ As you continue to attempt to navigate across the web , this PHP website will
624
628
continue to parse the ` dnsmasq` log and populate it with the latest info.
625
629
626
630
# # Troubleshooting
@@ -650,7 +654,8 @@ that all of your computers automatically send those blocked IPs to the sinkhole,
650
654
update your router' s DNS settings so that it points to the BeagleBone Black' s
651
655
IP as the primary DNS server. The Pi-hole website has a
652
656
[great example](https://discourse.pi-hole.net/t/how-do-i-configure-my-devices-to-use-pi-hole-as-their-dns-server/245)
653
- on how to do this.
657
+ on how to do this. You can customize the front end website by having it be more
658
+ dynamic, parse more stats, have a nicer looking GUI, and more!
654
659
655
660
# # Further Reading
656
661
@@ -659,5 +664,6 @@ Some useful links that helped me when I first started out:
659
664
- [Pi-hole Docs](https://docs.pi-hole.net/main/prerequisites/)
660
665
- [dnsmasq on ArchWiki](https://wiki.archlinux.org/title/Dnsmasq)
661
666
- [PHP Tutorial](https://www.php.net/manual/en/tutorial.php)
667
+ - [Get started with Bootstrap](https://getbootstrap.com/docs/5.2/getting-started/introduction/)
662
668
663
669
Happy blocking!
0 commit comments