mqtt-us.roborock.com
$ dig mqtt-us.roborock.com; <<>> DiG 9.10.6 <<>> mqtt-us.roborock.com;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46538;; flags: qr rd ra; QUERY: 1, ANSWER: 4, AUTHORITY: 0, ADDITIONAL: 1;; OPT PSEUDOSECTION:; EDNS: version: 0, flags:; udp: 1232;; QUESTION SECTION:;mqtt-us.roborock.com. IN A;; ANSWER SECTION:mqtt-us.roborock.com. 583 IN CNAME mqtt-slb-1st-1913472363.us-east-1.elb.amazonaws.com.mqtt-slb-1st-1913472363.us-east-1.elb.amazonaws.com. 60 IN A 44.209.56.31mqtt-slb-1st-1913472363.us-east-1.elb.amazonaws.com. 60 IN A 52.7.27.196mqtt-slb-1st-1913472363.us-east-1.elb.amazonaws.com. 60 IN A 54.235.188.250;; Query time: 355 msec;; SERVER: a.b.c.d#53;; WHEN: Tue Nov 28 11:11:30 PST 2023;; MSG SIZE rcvd: 159
mqtt*.roborock.com
@firewall 100% agree. The only real solution to a problem like this is to isolate that damn device. If you are in the lucky situation to have WiFi infrastructure that can do multiple SSIDs mapped to VLANs, then give that vacuum its own VLAN and permit access to the whole Internet but not anything local. Case closed in my opinion.
i gather that you're using aliases+pf rules to lock down traffic to the furthest extent possible on what reads like an iot vlan. if the devices only have access to manually-whitelisted endpoints and your vacuum wants to reach a mystery machine hosted on AWS for which you can't make a threat assessment, why not just allow access to any & all AWS ranges? the list is published & updated1 but you'll either need to parse the json (e.g. with jq ) or find a reliable source of these same data in a format consumable by opnsense...i'm sure such a thing exists. you might also use that step to remove any ranges not associated with EC2 (your hostname resolves to an elastic load balancer host and all IPs it distributes, in your case, are EC2).
*:8083
add'l point... pihole-FTL shares enough code base with dnsmasq to describe it as being functionally similar, and as such it will parse and leverage config files in /etc/dnsmasq.d/. from a workflow perspective these options are considered before its forwarding mechanism (to resolvers defined via pihole UI) kicks in. ootb, nothing that can meet your desire for pf rules unless you leveraged it to generate a locally-hosted reference for alias lookup via url on opnsense (e.g. alias = http://192.168.69.69/this_shit_sucks).
add'l point 2...if you insist upon addressing it with opnsense you should still be able to make it happen by:change dnsmasq listen port to something besides unbound's port 53, e.g. 53053add override for roborock.com at opnsense > domain overrides, specifying 127.0.0.1@53053 as authoritative nameserverfigure out what cli voodoo is required to add/modify dnsmasq configs on opnsense (making sure they persist)cross fingers, pray to the networking gods regularly, and research alternatives in the interim
add'l point 3...subjectively, trying to do *more* with dns on opnsense vs. moving it elsewhere has led to more problems than solutions for me (e.g. host blocking via unbound DNSBL on opnsense will give you heartburn, not exploring the adguard community plugin is an exercise in sanity preservation, i could go on). i'm sure circumstances such as migrating to unbound as default, changing ddns clients, etc don't help matters much but i'm not in the business of making excuses for time wasted.
pkg install jqcurl https://ip-ranges.amazonaws.com/ip-ranges.json | jq -r '.prefixes | keys[] as $k | "\(.[$k] | .ip_prefix)"' > /usr/local/www/aws_ranges.txt
You don't recommend adguard plug-in on Opnsense?
@morik_opnsense, i'd suggest either allowing to all AWS ranges (see below) or further isolating the device. if your concern is based on possible phone-home to china do both. establish initial list:Code: [Select]pkg install jqcurl https://ip-ranges.amazonaws.com/ip-ranges.json | jq -r '.prefixes | keys[] as $k | "\(.[$k] | .ip_prefix)"' > /usr/local/www/aws_ranges.txtestablish update mechanism:- firewall > aliases > add - type 'url table (ips)', refresh frequency 5 days should be fine, content = http://127.0.0.1/aws_ranges.txtthen your pf rule just needs to block all vacuum traffic with exception of aws_ranges alias.
What benefit does this provide over just creating an ASN alias for AWS? https://ipinfo.io/AS16509