Interface addresses responding to host PINGs

Started by FredsterNL, February 02, 2025, 05:28:53 AM

Previous topic - Next topic
Hi all,

I ran into a small problem and have no idea how to solve it:

My OPNsense configured for a static IP address, for example: 192.168.1.10 and hostname opnsense.my.domain. My laptop is on the main LAN on 192.168.1.19 (obtained via DHCP)

I also have a couple of VLAN interfaces configured with a static IP:
VLAN 20:  192.168.20.1
VLAN 30:  192.168.30.1

The issue I run into is that when I PING my OPNsense (Running latest from my laptop, I see this:

ping opnsense.my.domain

Pinging opnsense.my.domain (192.168.30.1) with 32 bytes of data
Reply from 192.168.30.1 time=9ms
Reply from 192.168.30.1 time=10ms
Reply from 192.168.30.1 time=10ms
Reply from 192.168.30.1 time=9ms
Packets sent = 4, Packets received = 4, No packets lost

Note that my OPNsense IP actually is 192.168.1.10 (Not 192.168.30)

When I flush my DNS (Unbound) with IPCONFIG /FLUSHDNS I get:

Pinging opnsense.my.domain (192.168.20.1) with 32 bytes of data
Reply from 192.168.20.1 time=10ms
Reply from 192.168.20.1 time=11ms
Reply from 192.168.20.1 time=10ms
Reply from 192.168.20.1 time=9ms
Packets sent = 4, Packets received = 4, No packets lost

When I flush DNS again, sometimes even my WAN interface responds:

Pinging opnsense.my.domain (31.x.y.z) with 32 bytes of data
Reply from 31.x.y.z time=11ms
Reply from 31.x.y.z time=11ms
Reply from 31.x.y.z time=10ms
Reply from 31.x.y.z1 time=9ms
Packets sent = 4, Packets received = 4, No packets lost

Any idea what is causing this and how to correct it?

Any help is greatly appreciated!

Fred


Running OPNsense on a Deciso DEC750 with upgraded memory (16GB ECC) and active cooling

Is your issue that all of the interfaces respond to ping (as suggested by your post's subject), or that DNS responds with all of the addresses (as suggested by your description)?

By default, the Unbound DNS service will create host records for all interfaces that it is listening on. It's up to the client to decide which of the returned IP addresses to attempt to ping. If you want more control of those records, you can use [Services > Unbound DNS > General > Do not register system A/AAAA records] and then create host overrides as you desire.

February 02, 2025, 11:44:20 AM #2 Last Edit: February 02, 2025, 11:49:41 AM by FredsterNL Reason: addition
Hi Dseven,

My issue is that I don't get the correct reply:

When I PING OPNSENSE.MY.DOMAIN I should get back 192.168.1.10

Instead I am getting results 192.168. 20.1 or 192.168.30.1 and even the IP from my WAN interface...

I don't get back the correct IP for the OPNsense management interface... I don't want the VLANs' interface address to respond at all: My laptop is on the same LAN as OPNSENSE.MY.DOMAIN)

Why are VLANs interface IP'S (The static IP specified when creating the VLAN) and my WAN IP  claiming to be OPNSENSE.MY.DOMAIN (Which is 192.168.1.10)
Running OPNsense on a Deciso DEC750 with upgraded memory (16GB ECC) and active cooling

Those *are* interfaces on your firewall. Again, if you want that hostname to point to one specific interface address, turn off the automatic records and create a host override.