I would like to know if its possible to use a routerboard with router os to substitute temporarily a DNS server. If the answer is yes, how would I do it and how would I protect it from being used outside my network.
To block access to udp/53 via the WAN interface. Make sure you accept established/related connections above that so that the router does get back DNS replies it asked for.