Configuring Multicast DNS and IGMP across VLANs on Unifi

Since I have two VLANS, some things stop working if I am trying to use a device on one network from the other.

As an example, at the moment I have put my Sonos speakers on the IOT VLAN, but i want to be able to control that from my mobile which connects to the normal network.

Multicast DNS is what is needed to make this work.

{
"service": {
	 "mdns": {
	  "repeater": {
	   "interface": [
	    "eth1",
	    "eth1.20"
	    ]
	   }
	 }
  }
}

This means that mdns traffic from one network, will be repeated to the other.

The next thing I found I also had to enable was IGMP-Proxy.

{
  "service": {
   	"protocols": {
    	"igmp-proxy": {
    		"interface": {
      		"eth1":{
      			"alt-subnet": [
      				"0.0.0.0/0"
      			],
      			"role" : "upstream",
      			"threshold": "1"
      		},
      		"eth1.20":{
      			"alt-subnet": [
      				"0.0.0.0/0"
      			],
      			"role" : "downstream",
      			"threshold": "1"
      		}
    		}
    	}
    }
  }
}

Adding host records and cnames to a Unifi USG

At the moment I have my local domain name set to gsellis.com – the first issue I came across was that I lost the ability to look up my domain names on the internet – because the USG held the record of truth for gsellis.com.

I am fairly sure I should be able to configure it to look up unknown addresses, but i have not found out how yet.

The current solution I have implemented is to update the dnsmasq config with my internet domain name records – this means that if I make a change, I need to make it locally and on the internet – I will fix this when it becomes an issue.

{
"service": {
   "dns": {
     "forwarding": {
        "options": [
           "ptr-record=1.5.168.192.in-addr.arpa,USG",
           "all-servers",
           "cname=unifi.gsellis.com,unifi",
           "server=8.8.8.8",
           "server=8.8.4.4",
           "host-record=unifi,192.168.5.8",
           "host-record=gsellis.com,45.153.187.229",
           "cname=www.gsellis.com,gsellis.com"           
           ]
         }
     }
  }
}

Here I have my upstream DNS for the USG set to google, plus the domain name record for gsellis.com – i have included others but they arent important here.

Initially I just added the host record and cname – this resulted in the USG losing the ability to lookup any websites – meaning things like time server, dynamicdns etc stopped working. Adding the data back fixed things.

Configuration of a Unifi USG

Having recently upgraded our home network to Unifi, I figured it would be useful to record some of the configuration changes i’ve made.

I have set up the network with two main VLANs – our normal VLAN, and an IOT network. The aim of the IOT network is to seperate IOT devices from the rest of the network. At the moment I havent implemented any block rules yet – i have been trying to get everything working as normal first before I start blocking traffic.

As well as the two local networks, I also am running two wireguard interfaces on the USG – one for incoming connections and one which establishes an outgoing connection.

For the incoming interface I can connect from my phone, I also have a VPS that I use for various purposes – I am now allowing this to connect into my network and then the majority of services run across that interface now instead of over the public internet.

The first configuration change I had to make was adding configuration to dnsmasq