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
- Open the Xermius app
- Navigate to the Host Mapping tab in the sidebar
Creating a Mapping
How to Create
- Click Add button
- Fill in details:
| Field | Description | Required |
|---|---|---|
| Domain | Domain name (e.g., example.com) | Yes |
| IP Address | Target IP address | Yes |
| Status | Active/Inactive | No |
| Notes | Description for mapping | No |
- Click Save
Examples
Domain: dev.example.com
IP: 192.168.1.100
Notes: Local dev server
Managing Mappings
Edit Mapping
- Click on a mapping
- Edit fields
- Click Save
Toggle Mapping
- Click toggle button next to mapping
- Mapping is enabled/disabled without deleting
Delete Mapping
- Click on a mapping
- Click Delete
- Confirm deletion
Bulk Actions
| Action | Description |
|---|---|
| Enable All | Enable all mappings |
| Disable All | Disable all mappings |
| Delete All | Delete all mappings |
Search and Filter
Search
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:
- Click Menu button
- Select Read from /etc/hosts
Reading from system file requires admin/root privileges on macOS/Linux.
Apply to System
To apply Xermius mappings to the system hosts file:
- Click Menu button
- Select Apply to /etc/hosts
- Confirm admin authentication
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:
- Click Menu button
- Select Flush DNS Cache
- 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
- Backup: Backup hosts file before applying changes
- Document: Add notes for each mapping to know why
- Clean up: Remove unused mappings regularly
- Use selectively: Only enable when needed
Troubleshooting
Mapping Not Working
- Verify mapping status (enabled)
- Check DNS cache is flushed
- Verify domain name is correct
- Ping domain to check resolution
Cannot Apply to /etc/hosts
Cause: Missing admin privileges
Solution:
- Run Xermius with admin privileges
- Or manually edit hosts file
Changes Don't Persist
Cause: System may be overwriting hosts file
Solution:
- Check for software that manages hosts (antivirus, VPN, etc.)
- Disable auto-host management features
Keyboard Shortcuts
| Shortcut | Action |
|---|---|
Ctrl/Cmd + N | New mapping |
Ctrl/Cmd + F | Focus search |
Delete | Delete selected mapping |
Next Steps
- Known Hosts - Manage SSH known hosts
- Host Key Verification - Verify server keys