Adding A records to Expressway hosts.conf file

So it finally happened to me – an MRA project with multiple domains. Previously I didn’t have to manually add entries to the ‘hosts’ file on Expressway, and needed to do some research. Here’s what came out of it:

‘A’ records are added to hosts.conf file which doesn’t exist by default and must be located at /tandberg/etc/dnsmasq.conf.d/. The screenshot below shows that it doesn’t exist (BTW, everything is done on Expressway version X12.6.2).

Login to Exp-C’s CLI with root credentials. Create the hosts.conf file with touch:

touch /tandberg/etc/dnsmasq.conf.d/hosts.conf

Edit the file with vim:

vim tandberg/etc/dnsmasq.conf.d/hosts.conf

After pressing ‘Enter’ we enter the file editing mode. Press ‘i’ to start typing. When done, press ‘Esc’ to exit editing and type ‘:wq!’ to write the file and quit it. Both ‘A’ and PTR records must be created!


Let’s see if it worked using cat:

cat /tandberg/etc/dnsmasq.conf.d/hosts.conf

This image has an empty alt attribute; its file name is Screenshot-2020-09-17-122101.png

We can see that the entries are there. We need to restart the dnsmasq for changes to take effect. Type:

/etc/init.d/dnsmasq restart

Records in hosts.conf survive VM reboot, so they’re permanent.

3 Comments on “Adding A records to Expressway hosts.conf file

  1. Great post.
    However, it does not seem to work in Expressway v14?
    /tandberg/etc/dnsmasq.conf.d/hosts.conf: Permission denied
    Has this been changed?
    Not possible anymore to modify the hosts file in v14?

    • Haven’t tried it in v14. My local CUCM/IMP infrastructure was still on v12.5. I don’t work in networking anymore, so probably won’t get a chance to try it in v14

  2. Hi, in Version 14 you remove the tandberg directory
    vi etc/dnsmasq.cnf.d/hosts.conf
    however I was unable to do: etc/init.d/dnsmasq restart
    so did a reboot