Looking through the mosquitto docs I don’t see a way to filter subnets. The closest thing I found was that you can use a config like
listener 1883
bind_interface eth0
And then use your firewall to set up rules about the traffic coming in on that port to limit it to the same subnet.