What's new
  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Two DNS requests to amazonaws every 30 seconds since installing AIMesh

Does your router have a domain? Does bifrost.home.arpa (or whatever your domain is) work? Is the lack of dots a factor?
 
Does your router have a domain? Does bifrost.home.arpa (or whatever your domain is) work? Is the lack of dots a factor?

I had same thought you did after my last post. My local domain is indeed .home.arpa, and trying bifrost.home.arpa:8443 via browser doesn't connect at all.
 
Might not be a security issue after all. For some reason the router fails to properly parse it to extract the port when using that name versus when using the original router name:

Code:
Jul 16 17:03:46 debug: host_name: gtaxe16000:8443 - host_name_temp: gtaxe16000
Jul 16 17:04:09 debug: host_name: bifrost:8443 - host_name_temp: bifrost:8443
 
The router calls ParseIPv4OrIPv6() on your hostname, and it fails to detect "bifrost" as being a hostname and considers it to be an IP.

The simplest workaround on your end is within your local host file, add a FQDN for it. I.e.:

Code:
192.168.50.1 bifrost bifrost.mylonely.lan

Then if you use https://byfrost.mylonely.lan:8443 it will properly be detected as a hostname, and get correctly parsed.

I can probably protect ParseIPv4OrIPv6() by checking first if the string is devoid of any dot and bracket (an IPv6 would be enclosed in brackets), in which case I would process it as a hostname. That wouldn't be 100% fool proof, but a proper fix would probably require the lengthy ParseIPv4OrIPv6() function to be reworked - not something I'm really keen on attacking myself.
 
The router calls ParseIPv4OrIPv6() on your hostname, and it fails to detect "bifrost" as being a hostname and considers it to be an IP.

The simplest workaround on your end is within your local host file, add a FQDN for it. I.e.:

Code:
192.168.50.1 bifrost bifrost.mylonely.lan

Then if you use https://byfrost.mylonely.lan:8443 it will properly be detected as a hostname, and get correctly parsed.
So I just tried that, and it fails certificate check and drops down to port 80. So, yeah, looks like I'll have to explicitly add bifrost.home.arpa to my certificate to make that work. And since I had to remake it recently and the process is fresh in my mind, and I'm quite curious if this'll actually *work* (meaning system status page doesn't break), let me go ahead and try that. For the science.
 
Does it receive the :8443 and consider the colon to be part of an IPv6 address?
No, because it deals fine with gtaxe16000:8443.
So I just tried that, and it fails certificate check and drops down to port 80.
That is a browser issue. With a regular browser (Chrome or Firefox), you can tell it to accept the certificate anyway, and it should not try to switch you to a different port.
 
No, because it deals fine with gtaxe16000:8443.

That is a browser issue. With a regular browser (Chrome or Firefox), you can tell it to accept the certificate anyway, and it should not try to switch you to a different port.

Sigh. Merlin, if you're taking requests... could you just make the router do a service restart_httpd after importing a new certificate? I mean, couldn't Asus just assume that would be obviously necessary part of the process? Either you have to ssh and run that manually or wait like half an hour for it to restart on its own, otherwise it keeps serving up the old cert. Took me like 20 minutes to figure out why it wasn't taking. The whole importing cert process is painful enough for most people without having that idiocy confusing the hell out of people. Bet it would reduce complaints/questions on that topic a lot.

Anyway. So, yes, if you have bifrost.home.arpa in the certificate AND you pull it up via bifrost.home.arpa:8443, it does parse correctly, and status page works. Still can't do bifrost:8443 tho.
 
could you just make the router do a service restart_httpd after importing a new certificate?
It does that, but only after you log out, to limit disruptions.

Code:
        else if (!strcmp(script, "prepare_cert")) {
                int r;

                r = prepare_cert_in_etc();
                if (r > 0) {
                        /* Load new certification after the current session logout. */
                        nvram_set("httpds_reload_cert", "2");
#if defined(RTCONFIG_IPV6)
                        if (ipv6_enabled() && nvram_match("misc_http_x", "1")) {
                                nvram_set("httpds6_reload_cert", "2");
                        }
#endif
                }
        }

It probably also does it this way so it can validate the certificate before reloading it.
 
This should take care of most cases of incorrectly detected IPs.


I had a look at potentially rewriting ParseIPv4OrIPv6(), but too many chances of something else breaking along the way.
Did you figure out why gtaxe16000:8443 was OK but not bifrost:8443? Was it the digits before the colon?
 
Did you figure out why gtaxe16000:8443 was OK but not bifrost:8443? Was it the digits before the colon?
No idea. The ParseIPv4OrIPv6() is so long and complicated that I didn't bother trying to understand where it failed. I doubt that was it tho, because I use "stargate" on my primary router.
 
This should take care of most cases of incorrectly detected IPs.


I had a look at potentially rewriting ParseIPv4OrIPv6(), but too many chances of something else breaking along the way.

Good to know about logging out triggering httpd restart. I was shutting down all tabs browsing to my router, but didn't think to explicitly log out. And thanks for taking care of this weird bifrost parsing issue.

Now to return to the OP topic - do you have any insight on what awsiot actually does? Like what features it enables/is used for? It seems like it was engaged in a whole lot of communication for a feature that I wasn't even using, or at least whose absence I am not missing. I was able to resolve it by declining Asus privacy permissions because I'm not using any of the features that enables, but seems to me other users who do want those features won't have that option, and there could be at least some efficiency gains (not to mention privacy/security gains) in making the run of that service conditional on... well, whatever it's actually needed for actually being used.

Given the aws link, I'm *guessing* it's just for Alexa controlling IoT devices. I'd think plenty of people who want *a* feature that requires Asus privacy permissions aren't necessarily running Alexa and all that awsiot traffic isn't necessary for them.
 
Last edited:
It's not just for Alexa. I know that it's related to the Tencent game accelerator feature among other things, but I don't know anything more - I've never looked into it. I think it's also tied to a future cloud-based router management plan that they seem to have.
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Staff online

Back
Top