What's new

Custom firmware build for R9000/R8900 v. 1.0.4.36HF

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Yes, I'm that same Kamoj .

The add-on v5 does not use rc.local.
You should have uninstalled previous version before installing v5.
PS
I'm very happy to see you here and contributing!
Thank you!

Ah i had kamoj installed but it was throwing errors in my log constantly so I disabled it, I didnt realize there was an update feature in it. Awesome! Ignore my post then!

EDIT: For reference, this is the error (I uncommented out the lines in /etc/rc.local and ran them, resulting in this output, which I was seeing in the log). You can ignore the AdGuard is running line, I added a line to start AdGuard Home.

Code:
bash 12:33:56 root@R9000 ~:# bash /etc/rc.local
AdGuard is running
/etc/rc.local: line 8: Wed: command not found
bash 12:34:02 root@R9000 ~:# sh: Off: bad number
sh: Off: bad number
sh: Off: bad number
sh: Off: bad number
sh: Off: bad number
...etc

EDIT 2: Looks like maybe I didnt have Kamoj installed correctly, investigating this. If I still have errors I will let you know since I assume you are the author!
 
Yes, I'm that same Kamoj .

The add-on v5 does not use rc.local.
You should have uninstalled previous version before installing v5.
PS
I'm very happy to see you here and contributing!
Thank you!

I love contributing. I added AdGuardHome to my R9000 complete with init scripts and all. It's really an awesome replacement for the default dnsmasq service. It even has a DHCP server, but I have no use for that yet... Is there a way to share this like you have done with Kamoj? Is that even something people would want? The default AdGuardHome service installation ability doesn't support dd-wrt, just OpenWRT. I could modify their project (it's open source), but I dont know if they would accept the changes but I also don't know go that well.
 
Last edited:
Hello Sullen Dreams I would be very interested in using adguard home on my r9000 and Voxel firmware if that is possible.

Thank you!


In the meantime of me creating a package, you can easily install this yourself. Here is the method I used:
Note: this assumes your router has an IP of 192.168.1.1
  1. Download the latest AdGuardHome release from here: https://github.com/AdguardTeam/AdGuardHome/releases/latest
  2. You want the `AdGuardHome_linux_arm.tar.gz` release (not arm64)
  3. Extract the archive to a place on your USB, I did it at `/mnt/optware/apps/AdGuardHome`. You could also put it in `/opt/etc/AdGuardHome` and create an `/opt/etc/init.d/S08adguard` init file which is what I will be packaging.
  4. Navigate to your directory, and run `./AdGuardHome`. This will show you the port the install site is being run from which creates the config file for you. I believe it is initially port 3000. So navigate to http://192.168.1.1:3000. This will guide you through the initial setup to create the `AdGuardHome.yml` file.
  5. It will tell you port 80 is in use, as well as DNS port 53. You can set it to port 8080 and 5300 or something, respectively.
  6. After setup, you will be able to configure block lists, filter lists, use DOH, see filter stats, etc, at port 8080.
  7. In order to get your router to use AdGuard as it's DNS server, you have two options. In order to not modify the existing router functionality, I suggest this method:
  8. Add a firewall rule to redirect all requests to 53 to 5300 (The second options was which I initially did, which was modifying my `/etc/dnsmasq.conf` configuration to serve off a different port from 53, but that is dangerous because if AdGuard doesn't start on reboot -- eg you dont have an init script for AdGuard, you won't have DNS until it is started which requires SSHing in and starting it manually).
  9. @kamoj and/or @Voxel can assist here, but I believe this is the rule to add to `/root/firewall-start.sh` in order to have your DNS requests forwarded from 53 to 5300 (which you configured AdGuardHome to serve DNS requests from):
    1. Code:
      iptables -t nat -A PREROUTING ! -s 192.168.1.1/32 ! -d 192.168.1.1/32 -p tcp -m tcp --dport 53 -j DNAT --to-destination 192.168.1.1:5300
      iptables -t nat -A PREROUTING ! -s 192.168.1.1/32 ! -d 192.168.1.1/32 -p udp -m udp --dport 53 -j DNAT --to-destination 192.168.1.1:5300
    2. Im thinking that command ignores the local network? So maybe the code is?: I am not sure:
      Code:
      iptables -t nat -A PREROUTING -p tcp -m tcp --dport 53 -j DNAT --to-destination 192.168.1.1:5300
      iptables -t nat -A PREROUTING -p udp -m udp --dport 53 -j DNAT --to-destination 192.168.1.1:5300
Let me know if you have any questions, and I welcome feedback as I am not 100% sure on those iptables commands. It is possible the source could be changed to any source instead of just 192.168.1.1?

A cool feature of AdGuardHome is that it will auto-update itself by notifying there is an update and it restarts itself.
 
Thank you so much for sharing this!
Some more info about the firewall and more can be found here:
https://forum.openwrt.org/t/howto-running-adguard-home-on-openwrt/51678
Ah nice! I looked at the source code for AdGuardHome regarding their built-in "service install" function, but it only has support for OpenWRT, and the Voxel/Netgear build is quite different. That link had some good info on how to modify dnsmasq, I recommend using those instructions instead of my commands since the R9000 also uses dnsmasq. Thanks!
 
Thank you for the guide!. I've tried to install it and get to the Adguard home interface on http://192.168.1.1:8080 and all looks fine. But it seems that I cant make it to act as my DNS-server as I still get adds with it on. I think it on your step 7 I mess it up in some way.

In the meantime of me creating a package, you can easily install this yourself. Here is the method I used:
Note: this assumes your router has an IP of 192.168.1.1
  1. Download the latest AdGuardHome release from here: https://github.com/AdguardTeam/AdGuardHome/releases/latest
  2. You want the `AdGuardHome_linux_arm.tar.gz` release (not arm64)
  3. Extract the archive to a place on your USB, I did it at `/mnt/optware/apps/AdGuardHome`. You could also put it in `/opt/etc/AdGuardHome` and create an `/opt/etc/init.d/S08adguard` init file which is what I will be packaging.
  4. Navigate to your directory, and run `./AdGuardHome`. This will show you the port the install site is being run from which creates the config file for you. I believe it is initially port 3000. So navigate to http://192.168.1.1:3000. This will guide you through the initial setup to create the `AdGuardHome.yml` file.
  5. It will tell you port 80 is in use, as well as DNS port 53. You can set it to port 8080 and 5300 or something, respectively.
  6. After setup, you will be able to configure block lists, filter lists, use DOH, see filter stats, etc, at port 8080.
  7. In order to get your router to use AdGuard as it's DNS server, you have two options. In order to not modify the existing router functionality, I suggest this method:
  8. Add a firewall rule to redirect all requests to 53 to 5300 (The second options was which I initially did, which was modifying my `/etc/dnsmasq.conf` configuration to serve off a different port from 53, but that is dangerous because if AdGuard doesn't start on reboot -- eg you dont have an init script for AdGuard, you won't have DNS until it is started which requires SSHing in and starting it manually).
  9. @kamoj and/or @Voxel can assist here, but I believe this is the rule to add to `/root/firewall-start.sh` in order to have your DNS requests forwarded from 53 to 5300 (which you configured AdGuardHome to serve DNS requests from):
    1. Code:
      iptables -t nat -A PREROUTING ! -s 192.168.1.1/32 ! -d 192.168.1.1/32 -p tcp -m tcp --dport 53 -j DNAT --to-destination 192.168.1.1:5300
      iptables -t nat -A PREROUTING ! -s 192.168.1.1/32 ! -d 192.168.1.1/32 -p udp -m udp --dport 53 -j DNAT --to-destination 192.168.1.1:5300
    2. Im thinking that command ignores the local network? So maybe the code is?: I am not sure:
      Code:
      iptables -t nat -A PREROUTING -p tcp -m tcp --dport 53 -j DNAT --to-destination 192.168.1.1:5300
      iptables -t nat -A PREROUTING -p udp -m udp --dport 53 -j DNAT --to-destination 192.168.1.1:5300
Let me know if you have any questions, and I welcome feedback as I am not 100% sure on those iptables commands. It is possible the source could be changed to any source instead of just 192.168.1.1?

A cool feature of AdGuardHome is that it will auto-update itself by notifying there is an update and it restarts itself.
 
Thank you for the guide!. I've tried to install it and get to the Adguard home interface on http://192.168.1.1:8080 and all looks fine. But it seems that I cant make it to act as my DNS-server as I still get adds with it on. I think it on your step 7 I mess it up in some way.

Tried to get it on my R7800. Install is easy. Problem is to make it the default dns server. I'm running Adguard on port 5353 now but I cannot use that on windows clients (can't configure the dns port of windows clients).
Reluctant to make Adguard the default dns server on the R7800 and the iptables don't seem to forward from 53 (default Netgear bind) to 5353 (AdGuard).

Also installed pihole on raspbian, works like a charm. So windows clients --> dns server = pihole --> upstream dns server configured in netgear router --> opendns.org servers.
But, would like to get Adguard up but I'm stuck how to config on the r7800. Anyone?
 
Thank you for the guide!. I've tried to install it and get to the Adguard home interface on http://192.168.1.1:8080 and all looks fine. But it seems that I cant make it to act as my DNS-server as I still get adds with it on. I think it on your step 7 I mess it up in some way.
Tried to get it on my R7800. Install is easy. Problem is to make it the default dns server. I'm running Adguard on port 5353 now but I cannot use that on windows clients (can't configure the dns port of windows clients).
Reluctant to make Adguard the default dns server on the R7800 and the iptables don't seem to forward from 53 (default Netgear bind) to 5353 (AdGuard).

Also installed pihole on raspbian, works like a charm. So windows clients --> dns server = pihole --> upstream dns server configured in netgear router --> opendns.org servers.
But, would like to get Adguard up but I'm stuck how to config on the r7800. Anyone?

Sorry for the delay, these forum emails were going to spam. You can change the netgear dns server's listening port if you really want it to server on 53. Edit
Code:
/etc/dnsmasq.conf
and
Code:
/etc/dnsmasq-resolv.conf
and add
Code:
port=5300
at the bottom. Then restart the netgear dns server:
Code:
/etc/init.d/dnsmasq restart
. Now Adguard can run on 53. Note: each upgrade will reset those two conf files!
 
Sorry for the delay, these forum emails were going to spam. You can change the netgear dns server's listening port if you really want it to server on 53. Edit
Code:
/etc/dnsmasq.conf
and
Code:
/etc/dnsmasq-resolv.conf
and add
Code:
port=5300
at the bottom. Then restart the netgear dns server:
Code:
/etc/init.d/dnsmasq restart
. Now Adguard can run on 53. Note: each upgrade will reset those two conf files!
Thanks! Delay not a problem, no rush ;) Will test this.
 
  • Like
Reactions: KW.

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top