Hi,
I am a beginner and I have been using Openwrt One for a few weeks and have managed to set up my home network thanks to the help here. I would now like to set up Adguard home. At this link, it is not clear to me how to adapt the script to my case and how to execute it.
How to implement ‘Get the first IPv4 and IPv6 Address of router and store them in following variables for use during the script’
Are IPV4 and IPV6 from the LAN or WAN?
How should I edit the parameters, i.e. where should I enter IPV4 and IPV6?
I entered this in the terminal via SSH, but it does not work:
xx.x.x.x=$(/sbin/ip -o -4 addr list br-lan | awk “NR==1{ split($4, ip_addr, ‘/’); print ip_addr[1]; exit }”)
xxxx:xxxx:xxxx::xxxx=$(/sbin/ip -o -6 addr list br-lan scope global | awk “$4 ~ /^fd|^fc/ { split($4, ip_addr, ‘/’); print ip_addr[1]; exit }”)
echo ‘IPv4 router: “”${x.x.x.x}’
echo ‘IPv6 router: “”${xxxx:xxxx:xxxx::xxxx}’
I think the commands that follow this part should be entered into the terminal via SSH, but is that correct? Or is it a single script?
Thank you very much for your help.