Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On my Zyxel P-870HN-51b - although I reckon the same solution may then also apply to other router models - I would like to add custom host and domain names local to my network. I.e. I don't want to make use of an external DNS server for the purpose, but instead modify the configuration of the router to resolve such names.

Now, I am aware that even under the default shell (CLI) I can use echo and append lines to /etc/hosts or /var/hosts (the additional hosts file used by dnsmasq), but that information isn't persistent (across reboots) and I haven't found a way to reload dnsmasq without losing the connection to the router.

I know I can break into a more convenient shell (msh of busybox) by typing sh and have used that to explore the system quite a bit. However, it appears that there is no way for me to write to the persistent storage. Also, since there is no tar utility on the system, it is hard to fetch the files to my local machine and inspect them with more convenient tools (the installed tools don't include an editor, for example).

Any pointers as to either:

  • How to configure custom host names (A and AAAA records) via web interface or CLI, or
  • How to store the configuration so it survives reboots

... will be much appreciated.

share|improve this question

This is not my area of expertise, but.... /etc/host is for local resolving (aka what the Zyxel sees).

To answer to other systems you may want to install a DNS server. Which would require you to to write to the persistent storage.

In other words:

  • Either find a way to do that.
  • Replace the Zyxel,
  • Or add a third device to the network.
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .