i did install the package during build request but it wont forward me to 192.168.1.1:3000 for set up.
i think this is the error code. i ran this code in terminal too
root@OpenWrt:~# # Get the first IPv4 and IPv6 Address of router and store them in following variables for use during the script
.
root@OpenWrt:~# NET_ADDR=$(/sbin/ip -o -4 addr list br-lan | awk 'NR==1{ split($4, ip_addr, "/"); print ip_addr[1] }')
root@OpenWrt:~# NET_ADDR6=$(/sbin/ip -o -6 addr list br-lan scope global | awk 'NR==1{ split($4, ip_addr, "/"); print ip_addr[1
] }')
root@OpenWrt:~#
root@OpenWrt:~# echo "Router IPv4 : ""${NET_ADDR}"
Router IPv4 : 192.168.1.1
root@OpenWrt:~# echo "Router IPv6 : ""${NET_ADDR6}"
Router IPv6 : fd42:8026:d452::1
root@OpenWrt:~#
root@OpenWrt:~# # 1. Enable dnsmasq to do PTR requests.
root@OpenWrt:~# # 2. Reduce dnsmasq cache size as it will only provide PTR/rDNS info.
root@OpenWrt:~# # 3. Disable rebind protection. Filtered DNS service responses from blocked domains are 0.0.0.0 which causes dn
smasq to fill the system log with possible DNS-rebind attack detected messages.
root@OpenWrt:~# # 4. Move dnsmasq to port 54.
root@OpenWrt:~# # 5. Set Ipv4 DNS advertised by option 6 DHCP
root@OpenWrt:~# # 6. Set Ipv6 DNS advertised by DHCP
root@OpenWrt:~# uci set dhcp.@dnsmasq[0].noresolv="0"
root@OpenWrt:~# uci set dhcp.@dnsmasq[0].cachesize="1000"
root@OpenWrt:~# uci set dhcp.@dnsmasq[0].rebind_protection='0'
root@OpenWrt:~# uci set dhcp.@dnsmasq[0].port="54"
root@OpenWrt:~# uci -q delete dhcp.@dnsmasq[0].server
root@OpenWrt:~# uci add_list dhcp.@dnsmasq[0].server="${NET_ADDR}"
root@OpenWrt:~#
root@OpenWrt:~# #Delete existing config ready to install new options.
root@OpenWrt:~# uci -q delete dhcp.lan.dhcp_option
root@OpenWrt:~# uci -q delete dhcp.lan.dns
root@OpenWrt:~#
root@OpenWrt:~# # DHCP option 6: which DNS (Domain Name Server) to include in the IP configuration for name resolution
root@OpenWrt:~# uci add_list dhcp.lan.dhcp_option='6,'"${NET_ADDR}"
root@OpenWrt:~#
root@OpenWrt:~# #DHCP option 3: default router or last resort gateway for this interface
root@OpenWrt:~# uci add_list dhcp.lan.dhcp_option='3,'"${NET_ADDR}"
root@OpenWrt:~#
root@OpenWrt:~# #Set IPv6 Announced DNS
root@OpenWrt:~# for OUTPUT in $(ip -o -6 addr list br-lan scope global | awk '{ split($4, ip_addr, "/"); print ip_addr[1] }')
> do
> echo "Adding $OUTPUT to IPV6 DNS"
> uci add_list dhcp.lan.dns=$OUTPUT
> done
Adding fd42:8026:d452::1 to IPV6 DNS
root@OpenWrt:~# uci commit dhcp
root@OpenWrt:~# uci commit dhcp
root@OpenWrt:~# /etc/init.d/dnsmasq restart
udhcpc: started, v1.37.0
udhcpc: broadcasting discover
udhcpc: no lease, failing```
been trying to install adguardhome on my openwrt snapshot r28410-a85059438f" its refuses to direct me to 192.168.2.1:3000 after i did all the steps carefully
this what i did in ssh terminal after installing the apk from luci in
root@OpenWrt:~# service adguardhome enable
root@OpenWrt:~# service adguardhome start
root@OpenWrt:~# NET_ADDR=$(/sbin/ip -o -4 addr list br-lan | awk 'NR==1{ split($
4, ip_addr, "/"); print ip_addr[1] }')
# 5. Set Ipv4 DNS advertised by option 6 DHCP
# 6. Set Ipv6 DNS advertised by DHCP
uci set dhcp.@dnsmasq[0].noresolv="0"
uci set dhcp.@dnsmasq[0].cachesize="1000"
uci set dhcp.@dnsmasq[0].rebind_protection='0'
uci set dhcp.@dnsmasq[0].port="54"
uci -q delete dhcp.@dnsmasq[0].server
uci add_list dhcp.@dnsmasq[0].server="${NET_ADDR}"
#Delete existing config ready to install new options.
uci -q delete dhcp.lan.dhcp_option
uci -q delete dhcp.lan.dns
# DHCP option 6: which DNS (Domain Name Server) to include in the IP configurati on for name resolution
uci add_list dhcp.lan.dhcp_option='6,'"${NET_ADDR}"
#DHCP option 3: default router or last resort gateway for this interface
uci add_list dhcp.lan.dhcp_option='3,'"${NET_ADDR}"
#Set IPv6 Announced DNS
for OUTPUT in $(ip -o -6 addr list br-lan scope global | awk '{ split($4, ip_add r, "/"); print ip_addr[1] }')
do
echo "Adding $OUTPUT to IPV6 DNS"
uci add_list dhcp.lan.dns=$OUTPUT
done
uci commit dhcproot@OpenWrt:~# NET_ADDR6=$(/sbin/ip -o -6 addr list br-lan scope global | awk '
NR==1{ split($4, ip_addr, "/"); print ip_addr[1] }')
root@OpenWrt:~#
root@OpenWrt:~# echo "Router IPv4 : ""${NET_ADDR}"
Router IPv4 : 192.168.2.1
root@OpenWrt:~# echo "Router IPv6 : ""${NET_ADDR6}"
Router IPv6 : fdb8:1e51:1fd2::1
root@OpenWrt:~#
root@OpenWrt:~# # 1. Enable dnsmasq to do PTR requests.
root@OpenWrt:~# # 2. Reduce dnsmasq cache size as it will only provide PTR/rDNS
info.
root@OpenWrt:~# # 3. Disable rebind protection. Filtered DNS service responses f
rom blocked domains are 0.0.0.0 which causes dnsmasq to fill the system log with
possible DNS-rebind attack detected messages.
root@OpenWrt:~# # 4. Move dnsmasq to port 54.
root@OpenWrt:~# # 5. Set Ipv4 DNS advertised by option 6 DHCP
root@OpenWrt:~# # 6. Set Ipv6 DNS advertised by DHCP
root@OpenWrt:~# uci set dhcp.@dnsmasq[0].noresolv="0"
root@OpenWrt:~# uci set dhcp.@dnsmasq[0].cachesize="1000"
root@OpenWrt:~# uci set dhcp.@dnsmasq[0].rebind_protection='0'
root@OpenWrt:~# uci set dhcp.@dnsmasq[0].port="54"
root@OpenWrt:~# uci -q delete dhcp.@dnsmasq[0].server
root@OpenWrt:~# uci add_list dhcp.@dnsmasq[0].server="${NET_ADDR}"
root@OpenWrt:~#
root@OpenWrt:~# #Delete existing config ready to install new options.
root@OpenWrt:~# uci -q delete dhcp.lan.dhcp_option
root@OpenWrt:~# uci -q delete dhcp.lan.dns
root@OpenWrt:~#
root@OpenWrt:~# # DHCP option 6: which DNS (Domain Name Server) to include in th
e IP configuration for name resolution
root@OpenWrt:~# uci add_list dhcp.lan.dhcp_option='6,'"${NET_ADDR}"
root@OpenWrt:~#
root@OpenWrt:~# #DHCP option 3: default router or last resort gateway for this i
nterface
root@OpenWrt:~# uci add_list dhcp.lan.dhcp_option='3,'"${NET_ADDR}"
root@OpenWrt:~#
root@OpenWrt:~# #Set IPv6 Announced DNS
root@OpenWrt:~# for OUTPUT in $(ip -o -6 addr list br-lan scope global | awk '{
split($4, ip_addr, "/"); print ip_addr[1] }')
> do
> echo "Adding $OUTPUT to IPV6 DNS"
> uci add_list dhcp.lan.dns=$OUTPUT
> done
Adding fdb8:1e51:1fd2::1 to IPV6 DNS
root@OpenWrt:~# uci commit dhcp
root@OpenWrt:~# /etc/init.d/dnsmasq restart
udhcpc: started, v1.37.0
udhcpc: broadcasting discover
udhcpc: no lease, failing
That said, if you want DNS-based adblocking then there are other options on OpenWrt which require much less tinkering in order to install and coincidentally use much less system resources, compared to AdguardHome. Specifically: adblock, adblock-fast and adblock-lean:
All 3 options are good and known to work. I am a contributor to the adblock-lean project and as such, can recommend you to try it out. It is super easy to set up and highly optimized for memory usage and speed.
(uninstall AdguardHome before installing any of the alternatives)
I hope you are doin good. After 2 days trying with AGH i managed to run it on my openwrt router. However it didn't fulfill the purpose which is blocking ads over network the only device that have blocking service was only my PC ( connected directly to my openwrt router ) so i guess ima adblock-fast but before i start does it really block ads over wifi?
If AGH is working but only for one device then you are close to making it work for all devices. It's just a matter of some DNS-related configuration. Moreover, likely any DNS-based adblocker will require same or similar config changes. I'd recommend you to ask how this should be done in a new topic in 'Installing and using OpenWrt' and most likely you will get help.
Besides, I am a contributor to adblock-lean, not adblock-fast. Both adblock-lean and adblock-fast are capable of providing DNS-based adblocking to all devices on your network. If you install either of them, both have a dedicated support threads on this forum and people there will likely be able to help you as well: