Here is a how-to for Linux Dynamic DNS.
You will at least need this on your gateway do that others on the Internet can find you. I involves registering with a third party company.
You haven't indicated how may of the hosts have Internet connections or what kind of servers you are using. For some servers, you should use a static address. Also, what do you use for the DHCP server?
Given that you only have 20 hosts, you might want to use static addresses on your LAN (except for the interface connecting to the Internet). Copying 20 hosts files in a script would not be a lot of work.