omg I'm so careless .. The container was up and running.
Continuing the Test step.
root@OpenWrt:~/pihole/etc-cont-init.d# ping 192.168.1.3
PING 192.168.1.3 (192.168.1.3): 56 data bytes
64 bytes from 192.168.1.3: seq=0 ttl=64 time=0.354 ms
64 bytes from 192.168.1.3: seq=1 ttl=64 time=0.309 ms
64 bytes from 192.168.1.3: seq=2 ttl=64 time=0.281 ms
^C
--- 192.168.1.3 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.281/0.314/0.354 ms
root@OpenWrt:~/pihole/etc-cont-init.d# nslookup openwrt.org 192.168.1.3
Server: 192.168.1.3
Address: 192.168.1.3#53
Name: openwrt.org
Address 1: 139.59.209.225
Address 2: 2a03:b0c0:3:d0::1af1:1
root@OpenWrt:~/pihole/etc-cont-init.d# nslookup $root.lan 192.168.1.3
;; connection timed out; no servers could be reached
the http://192.168.1.3/admin can be opened now and i already do the Configure DNS settings in OpenWrt and Profit! steps .. now its the nslookup $root.lan 192.168.1.3 problem. the setupVars already use REV_SERVER_TARGET=127.0.0.11
The OpenWrt can ping 8.8.8.8 and google but my PC that connected to the Raspberry Pi by Lan Cable didnt get Internet Connection on the ethernet connection ..
The reason why my PC didn't get the internet via ethernet that connected to raspy and OpenWrt because I already did the Configure DNS settings in OpenWrt and Profit! steps from your post. When I delete the list dhcp_option '6,192.168.1.3' from the /etc/config/dhcp it works again now.
I didn't get it what to put in the (hostname) line so I just using root(Forgive me im stil newbie in this IT world). What should I use because the openwrt said ..
root@OpenWrt:~# nslookup $(hostname).lan 192.168.1.3
-ash: hostname: not found
;; connection timed out; no servers could be reached
Here is the output of the list command from my PC
C:\Users\Asus>ping 192.168.1.3
Pinging 192.168.1.3 with 32 bytes of data:
Reply from 192.168.1.3: bytes=32 time<1ms TTL=63
Reply from 192.168.1.3: bytes=32 time<1ms TTL=63
Reply from 192.168.1.3: bytes=32 time<1ms TTL=63
Reply from 192.168.1.3: bytes=32 time<1ms TTL=63
Ping statistics for 192.168.1.3:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:\Users\Asus>nslookup openwrt.org 8.8.8.8
Server: dns.google
Address: 8.8.8.8
Non-authoritative answer:
Name: openwrt.org
Address: 139.59.209.225
C:\Users\Asus>nslookup openwrt.org 192.168.1.3
Server: pi.hole
Address: 192.168.1.3
Non-authoritative answer:
Name: openwrt.org
Addresses: 2a03:b0c0:3:d0::1af1:1
139.59.209.225
No problem this is still my development test and I will change it later on production phase..
Shocking! I'm the one who needs to be forgiven, for mistakenly thinking there is a hostname command pre-installed in OpenWrt (thinking it being just another Linux distro clearly showed me I am wrong!). Never mind the nslookup $(hostname).lan 192.168.1.3. Try nslookup openwrt.lan 192.168.1.3 instead, should work and give the IP address 192.168.1.1.
The whole idea of $(hostname) was the shell to automatically replace it with openwrt, but since hostname command doesn't exist, that's why it didn't work. My mistake and will fix the tutorial.
Ok this is going to be a bit tricky, but you need to have dhcp_option '6,192.168.1.3' in /etc/config/dhcp, because if you don't then you won't be using PiHole and instead will use the default DNS 192.168.1.1 which means no ad-blocking, that's not our goal.
Add it again and run /etc/init.d/dhcp restart on RPi, then on your Asus laptop, disconnect the ethernet and then re-connect it (make sure WiFi is off so we don't get confused). Then run the following command on your Asus: nslookup openwrt.org and share the output. Try opening openwrt.org on your Asus browser and share a screenshot of the error if it's still not working.
Add the dhcp_option '6,192.168.1.3' in /etc/config/dhcp > reboot > turn off wifi reconnect the Laptop via Ethernet to Raspy > Run command nslookup openwrt.org..
I already check the DNS of my laptop and yes it is using 192.168.1.3 .. but I try opening some news website the ads didn't got block, I try removing all the data clear history, cache, and etc reopening the website but it didn;t got block .. I alreadt try PiHole before running at ubuntu desktop using vmware it did work blocking the ads .. is there configuration I miss or the OpenWrt slip up other DNS server so the Ads still show up ?
I honestly did not consider IPv6 in this tutorial, in my setup I have disabled IPv6 in OpenWrt so my entire LAN is just using IPv4. Is IPv6 important to you? If not let's disable it temporarily on your Asus and try again. Follow the steps in below link, do it on the Ethernet Adapter instead of the WiFi adapter. Also there is no need to restart your computer, just disconnect and reconnect the Ethernet cable. https://answers.uillinois.edu/uis/page.php?id=99981
Look at the output of the DNS servers you have, there are three! One is the PiHole which is in the middle, but the other two are the OpenWrt IPv6 default DNS server (which doesn't block ads). Guess what, your Asus is most probably using the IPv6 instead of IPv4, so that's why the ads are not blocked.
Remember that in your post here the commands were working just fine so I expect the commands above commands should still be working unless something has changed:
Thank you so much, everything works now its just some firewall setting I try that make DNS isn't responding after I disabled that setting everything works fine now. The OpenWrt gave IP address of Pi-Hole as DNS and the ads got block.
Once again thanks for helping..