Closed Dizzy611 closed 6 years ago
I've had issues with this myself. The IP detection code is from the project that I forked from so I am not sure exactly how it all works. It does seem to work on Ubuntu but I would like to replace this code with something simpler and more standardized. There must be a better way to do it.
But to answer your other question, yes you can just do what you suggested and it should work fine.
At first I had the problem of, when I went to set things up I noticed it seemed to be working but when testing, all queries for things like steamcontent.com etc would show up nonexistent (nxdomain). When I poked about the docker container to see what was going on (I added bash to dnsmasq container and prodded its files to take a look), I noticed that the bit of each entry that's supposed to contain my IP was simply blank.
Looking at start-dnsmasq.sh immediately showed me why:
If I run
ip route | grep default
on my system, I get the following output:If I then expand that to
ip route | grep default | awk '{print $(NF)}'
, the result is as follows:which isn't exactly a correct parameter to
ip addr show dev
(I assume you meant to pull 'bond0')I think your shell magic may be slightly out of date or something? I admit, I'm not familiar with how AWK works, but it's clearly pulling the wrong part of the output.
For the time being, can I simply edit start-dnsmasq.sh to put HOST_IP=192.168.1.201 and restart docker, or does something else need done?