Skip to main content

Host Mapping

Host Mapping allows you to manage domain-to-IP mappings similar to the /etc/hosts file. This is a way to override DNS resolution for specific domains.

Overview

What is Host Mapping? Instead of using regular DNS, you can manually specify an IP address for a domain. This is useful when:

Common use cases:

  • Override DNS for development environments
  • Point domain to local development server
  • Bypass DNS to test staging versions
  • Block malicious domains
  • Manage custom routes

Opening Host Mapping

  1. Open the Xermius app
  2. Navigate to the Host Mapping tab in the sidebar

Creating a Mapping

How to Create

  1. Click Add button
  2. Fill in details:
FieldDescriptionRequired
DomainDomain name (e.g., example.com)Yes
IP AddressTarget IP addressYes
StatusActive/InactiveNo
NotesDescription for mappingNo
  1. Click Save

Examples

Domain: dev.example.com
IP: 192.168.1.100
Notes: Local dev server

Managing Mappings

Edit Mapping

  1. Click on a mapping
  2. Edit fields
  3. Click Save

Toggle Mapping

  1. Click toggle button next to mapping
  2. Mapping is enabled/disabled without deleting

Delete Mapping

  1. Click on a mapping
  2. Click Delete
  3. Confirm deletion

Bulk Actions

ActionDescription
Enable AllEnable all mappings
Disable AllDisable all mappings
Delete AllDelete all mappings

Search and Filter

Type in search box to filter mappings:

  • Search by domain name
  • Search by IP address
  • Search by notes

Filter by Status

Filter mappings by status:

  • All: Show all
  • Active: Only enabled mappings
  • Inactive: Only disabled mappings

Clear Filters

Click Clear Filters to reset to view all.

Working with /etc/hosts

Read System Hosts File

Xermius can read from the system hosts file:

  1. Click Menu button
  2. Select Read from /etc/hosts
warning

Reading from system file requires admin/root privileges on macOS/Linux.

Apply to System

To apply Xermius mappings to the system hosts file:

  1. Click Menu button
  2. Select Apply to /etc/hosts
  3. Confirm admin authentication
warning

Modifying the system hosts file requires admin privileges and may affect system-wide DNS resolution.

Flush DNS Cache

After changing hosts file, you may need to flush DNS cache:

  1. Click Menu button
  2. Select Flush DNS Cache
  3. Confirm action

Use Cases

Development Setup

# Point staging domains to local server
staging.example.com → 127.0.0.1
api.staging.example.com → 127.0.0.1

Testing New Server

# Test new production server before DNS propagates
example.com → 203.0.113.50 (new server IP)

Block Malicious Domains

# Block known malicious domains
malware.example.com → 127.0.0.1
ads.example.com → 127.0.0.1

Custom Routing

# Custom route for internal services
internal.example.com → 10.0.0.5
db.internal.example.com → 10.0.0.10

Security

Permissions

  • Admin Required: Modifying system hosts file requires admin privileges
  • Local Only: Mappings only apply to local machine
  • No Sync: Host mappings are not synced between devices

Best Practices

  1. Backup: Backup hosts file before applying changes
  2. Document: Add notes for each mapping to know why
  3. Clean up: Remove unused mappings regularly
  4. Use selectively: Only enable when needed

Troubleshooting

Mapping Not Working

  1. Verify mapping status (enabled)
  2. Check DNS cache is flushed
  3. Verify domain name is correct
  4. Ping domain to check resolution

Cannot Apply to /etc/hosts

Cause: Missing admin privileges

Solution:

  1. Run Xermius with admin privileges
  2. Or manually edit hosts file

Changes Don't Persist

Cause: System may be overwriting hosts file

Solution:

  1. Check for software that manages hosts (antivirus, VPN, etc.)
  2. Disable auto-host management features

Keyboard Shortcuts

ShortcutAction
Ctrl/Cmd + NNew mapping
Ctrl/Cmd + FFocus search
DeleteDelete selected mapping

Next Steps