PiAware DNS selection

I’ve changed my PiAware 3.5.3 card setup from using DHCP to having a static address and I’ve found two problems on which I’d welcome comment.

  1. The default is to use DHCP. However I’ve now noticed that /etc/resolv.conf contains only Google’s DNS servers. I had assumed, all this time I’ve been running it, that PiAware would be using the DNS servers supplied by my DHCP server. I am quite annoyed to find that all this time it’s been chattering away to Google as I actively avoid using Google’s DNS.

  2. In setting a static address there doesn’t appear to be a way to specify the DNS in the Advanced Configuration. This is what led me to poke around in resolv.conf and discover the above. I’ve tried putting in my own server but it gets overwritten by the config from resolvconf.conf. I’ve edited that file and put in my own server and commented out the package mirror defaults, and this creates a resolv.conf with my server at the start but still adds Google’s entries as secondary and tertiary servers. Possibly by dhclient but now it’s getting into messing with services which are needed for the defaults.

I appreciate that this may be Debian default behaviour but I’d like to see it cleaned up in the PiAware image given that we have this lovely Advanced Config capability for handling networking. For PiAware package install then yes it should clearly defer to the OS.

For the card image:

  • I welcome advice on how I can specify my own DNS server and stop whatever is adding Google’s addresses.

  • Could PiAware get a couple of new Advanced Config entries to allow users to configure servers explicitly please

    wired-dns
    wireless-dns
    

both of which default to the DHCP-provided server (expected behaviour) or 8.8.8.8 8.8.4.4 if not present. This would appear to solve all of these concerns in one fell swoop.

As a workaround you can just specify your server 3 times.

Only 3 entries are allowed in resolv.conf so the google entries will be ignored.

The debian wiki tells me you can also do this:

With resolvconf installed, you can tell it to do nothing whenever some daemon tries to modify resolv.conf, by putting resolvconf=NO in the /etc/resolvconf.conf file. (Note: this is not the /etc/resolv.conf file!)

The Google DNS servers have nothing to do with Debian defaults by the way, that’s a piaware sd-card design choice i would presume.

I don’t think the piaware package touches the network settings at all.

There is: wired-nameservers and wireless-nameservers. These are only used when configuring a static address and default to the Google nameservers.

If you configure DHCP it should be using whatever nameservers DHCP hands out, not the Google ones.

(The static address stuff hasn’t been touched in a while and I don’t recall explicitly testing it with the stretch changes, so it’s possible something broke here)

Hi obj, thanks for the info on the nameservers options. I’ve tested adding a single nameserver in piaware-config.txt and that does indeed remove google’s nameservers and use just the one specified. So I’ve not been chattering to Google’s DNS afterall.

I apologise for jumping the gun assuming that Google had always been used a default. After seeing it appear after moving to a static IP I wasn’t aware that it was possible to specify a nameserver, so I wrongly assumed the option was missing because Google was hard-coded in to make things easy from a support POV.

These options are not listed on the Advanced Config page which is why I ended up going down this rabbit hole. Would it be possible to add them to the page please for reference? Due to the lack of a nameserver config option I had assumed that when setting a static IP it was using the gateway address for DNS since that is commonly a consumer router handing out DNS too and probably covers much of your use cases. I had no idea Google was being used until I spotted it.

What is the format for adding more than one nameserver with these options? Are they all space-delimited, eg

wired-nameservers 192.168.10.10 10.10.10.10

Thanks

There is

piaware-config -showall

But i didn’t check it for a nameserver config option myself but rather checked
(PiAware - Advanced Configuration Settings - FlightAware)

Thanks wiedhopf, that tweak in resolvconf.conf works, it stops it from updating resolv.conf, meaning you can specify your own nameservers and it’s not overwritten. But in fact it can be specified in piaware-config.txt afterall, and that hands the correct server to resolvconf.conf to place into resolv.conf. The nameservers options aren’t listed on the Advanced Config page at the time of writing, see the reply from obj for details.

Cheers, I don’t use piaware-config, just hand edit the config file using the options shown on the web page, I had no idea there were any more options than the ones listed. The top of the config file says it’s a complete list!

# For simplicity, this file only shows the most common options.
# For a complete list of options, see
# https://flightaware.com/adsb/piaware/advanced_configuration

The command shows this for 3.6.3 (on my install):

#allow-auto-updates            no                             # using default value
#allow-dhcp-duid               yes                            # using default value
allow-manual-updates           no                             # value set at /etc/piaware.conf:8
#allow-mlat                    yes                            # using default value
#allow-modeac                  yes                            # using default value
#beast-baudrate                <unset>                        # no value set and no default value
#enable-firehose               no                             # using default value
feeder-id                      1235-34345-34-34-34-343434 # value set at /etc/piaware.conf:7
#flightaware-password          <unset>                        # no value set and no default value
#flightaware-user              <unset>                        # no value set and no default value
#force-macaddress              <unset>                        # no value set and no default value
#http-proxy-host               <unset>                        # no value set and no default value
#http-proxy-password           <unset>                        # no value set and no default value
#http-proxy-port               <unset>                        # no value set and no default value
#http-proxy-user               <unset>                        # no value set and no default value
#image-type                    <unset>                        # no value set and no default value
#manage-config                 no                             # using default value
#mlat-results                  yes                            # using default value
#mlat-results-anon             yes                            # using default value
#mlat-results-format           "beast,connect,localhost:30104 beast,listen,30105 ext_basestation,listen,30106" # using default value
#priority                      <unset>                        # no value set and no default value
#radarcape-host                <unset>                        # no value set and no default value
#receiver-host                 <unset>                        # no value set and no default value
#receiver-port                 30005                          # using default value
receiver-type                  beast                          # value set at /etc/piaware.conf:9
#rfkill                        no                             # using default value
#rtlsdr-device-index           0                              # using default value
#rtlsdr-gain                   -10                            # using default value
#rtlsdr-ppm                    0                              # using default value
#wired-address                 <unset>                        # no value set and no default value
#wired-broadcast               <unset>                        # no value set and no default value
#wired-gateway                 <unset>                        # no value set and no default value
#wireless-gateway              <unset>                        # no value set and no default value
#wireless-nameservers          "8.8.8.8 8.8.4.4"              # using default value
#wireless-netmask              <unset>                        # no value set and no default value
#wireless-network              no                             # using default value
#wireless-password             <unset>                        # no value set and no default value
#wireless-ssid                 <unset>                        # no value set and no default value
#wireless-type                 dhcp                           # using default value

Aye, handy to know there are additional options

Hi obj, will that be possible please? The piaware-config.txt file says the Advanced Config page has “a complete list of options” and the title on that page says “All configuration settings” but the nameservers parameters are missing from it. Thanks.

I’ll ask the web team to take a look

As an aside, if you’re running your own firewall, it is possible to block all outbound DNS traffic and redirect all traffic to your own local DNS server. I’ve been doing this for a very long time with pfSense, for much the same reason.

Something like a pfSense appliance is next on my list, it’s starting to be worthwhile now given the proliferation of things wanting to chat to their motherships. There’s only so much basic consumer routers can do.

1 Like

Much appreciated thanks.