# Pinging Hosts - Different Hostnames in Return

**URL:** <https://community.ipfire.org/t/pinging-hosts-different-hostnames-in-return/15678>\
**Category:** DNS\
**Created:** [18 April 2026 14:16 UTC](https://community.ipfire.org/t/pinging-hosts-different-hostnames-in-return/15678 "2026-04-18T14:16:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![firewire](https://community.ipfire.org/user_avatar/community.ipfire.org/firewire/32/16590_2.png) [@firewire](https://community.ipfire.org/u/firewire)\
**Post date:** [18 April 2026 14:16 UTC](https://community.ipfire.org/t/pinging-hosts-different-hostnames-in-return/15678/1 "2026-04-18T14:16:42Z")

</div>

Hi there. I use the “Hosts” configuration page of iPFire to define internal IPs (that from the DMZ, for example) for external hostnames, eg:

```auto
192.168.15.45 www.mydomain.com
192.168.15.45 mail.mydomain.com
192.168.15.45 autoconfig.mydomain.com
192.168.15.45 analytics.mydomain.com

```

and so on. This works quite well, a client in the intranets (GREEN, BLUE) is directly routed to the DMZ IP, and WAN clients in the internet are natted via the RED interface into the DMZ.

But, when pinging (in the intranet), for example:

`$ ping www.mydomain.com`

it often doesn’t reply with the pinged hostname but with a different one, e.g:

```auto
64 bytes from analytics.mydomain.com (192.168.15.45): icmp_seq=1 ttl=63 time=0.771 ms
64 bytes from analytics.mydomain.com (192.168.15.45): icmp_seq=2 ttl=63 time=0.669 ms
64 bytes from analytics.mydomain.com (192.168.15.45): icmp_seq=3 ttl=63 time=0.605 ms

```

In addition, when repeating the ping towards www after a break it answers again but often with a different hostname:

```auto
64 bytes from mail.mydomain.com (192.168.15.45): icmp_seq=1 ttl=63 time=0.640 ms
64 bytes from mail.mydomain.com (192.168.15.45): icmp_seq=2 ttl=63 time=0.708 ms
64 bytes from mail.mydomain.com (192.168.15.45): icmp_seq=3 ttl=63 time=0.677 ms

```

I’d like to have a response here from www hostname rather than analytics or mail.

Is there anything I can do about this? Thank you for suggestions 🙂

---

<div class="post-metadata">

**Author:** ![bbitsch](https://community.ipfire.org/user_avatar/community.ipfire.org/bbitsch/32/7420_2.png) [@bbitsch](https://community.ipfire.org/u/bbitsch)\
**Post date:** [18 April 2026 14:50 UTC](https://community.ipfire.org/t/pinging-hosts-different-hostnames-in-return/15678/2 "2026-04-18T14:50:52Z")

</div>

Ping works on IP level. The name resolution is done using unbound.  
ping [www.mydomain.com](http://www.mydomain.com) first determines the IP for the destination (192.168.15.45) and send a request to this IP. The target computer answers with a packet ‘from 192.168.15.45 to sender IP’.  
This packet is handled by the initiator. The name is determined by reversed DNS ( find the name for IP ).  
But the (name,IP) relations are not bijective. There are multiple members (name,IP) with the same IP allowed. rDNS choses one of the possible names for the IP as answer.  
Your server in DMZ has multiple names, for the various taks it serves ( the real name for [www.mydomain.com](http://www.mydomain.com) is 192.168.15.45:80, but the port part isn’t handled by DNS/rDNS ).

In short, I think you can’t do anything to distinguish the parts of your server.
