Skip to content
Shellbay

Networking & Firewall · about 1 min · 3 steps

Add a hosts entry

Makes a name point to an IP address on this server only, through /etc/hosts, for example to reach another server by a private address.

Runs on

  • Debian / Ubuntu: supported
  • RHEL / Fedora: supported
  • Alpine: supported

What it changes on your server

  • Adds a line to /etc/hosts marked as added by Shellbay, replacing an earlier Shellbay line for the same name. The old file is kept with the run for 7 days.
  • Only this server sees the name; DNS isn't changed.

What Shellbay asks you

  1. Which name should point where?

    Enter the IP address and the name programs on this server should use for it. Names already listed in /etc/hosts by the system, such as localhost, can't be changed here.

    IP address
    Text, up to 45 characters
    Name
    Text, up to 253 characters

    Example: 10.0.0.5 db.internal

Steps

  1. Check the address and name
  2. Update /etc/hosts
  3. Check the name resolves

Shellbay checks the server before the first step, and stops at the first step that fails.

When it's done

  • ‹name› points to ‹ip address› on this server. Run Remove a hosts entry to undo it.