OPNsense Forum

Archive => 24.1, 24.4 Legacy Series => Topic started by: Nikotine on April 23, 2024, 11:48:12 PM

Title: Wrong IP for opnsense host
Post by: Nikotine on April 23, 2024, 11:48:12 PM
I've got a weird issue.
My laptop is connected to my main VLAN 10.25.9.x.
The opnsense router IP is 10.25.9.1.

Yet when I traceroute opnsense.home.example.com (redacted), I see a warning about multiple addresses and I see it uses 10.25.10.1.
niek@3cz4n3 ~ % traceroute opnsense.home.example.com         
traceroute: Warning: opnsense.home.example.com has multiple addresses; using 10.25.10.1
traceroute to opnsense.home.example.com (10.25.10.1), 64 hops max, 40 byte packets
1  *

That subnet is used by the wireguard wg0 interface.
Why isn't opnsense.home.example.com resolving to the normal 10.25.9.1?
Which setting should I be looking at, unbound?
Title: Re: Wrong IP for opnsense host
Post by: chemlud on April 24, 2024, 10:19:39 AM
as a starter: what gives

ip a

on your laptop? Is the laptop configured for wireguard?
Title: Re: Wrong IP for opnsense host
Post by: Patrick M. Hausen on April 24, 2024, 11:12:52 AM
By default a DNS lookup of "opnsense.my.do.main" returns all IP addresses of all interfaces local to OPNsense.

You can change this by

* Services > Unbound > General > Do not register system A/AAAA records
* Services > Unbound > Overrides - create an entry with the single IP address you prefer
Title: Re: Wrong IP for opnsense host
Post by: Nikotine on April 24, 2024, 06:59:35 PM
Quote from: chemlud on April 24, 2024, 10:19:39 AM
as a starter: what gives

ip a

on your laptop? Is the laptop configured for wireguard?

This is a Mac, it doesn't work.
ifconfig gives a whole lot of interfaces, none of which are for wireguard.
I connect to wireguard using the wireguard app.

Quote from: Patrick M. Hausen on April 24, 2024, 11:12:52 AM
By default a DNS lookup of "opnsense.my.do.main" returns all IP addresses of all interfaces local to OPNsense.

You can change this by

* Services > Unbound > General > Do not register system A/AAAA records
* Services > Unbound > Overrides - create an entry with the single IP address you prefer
Do I need both settings, or just one of them?
Title: Re: Wrong IP for opnsense host
Post by: Patrick M. Hausen on April 24, 2024, 07:19:45 PM
If you set the first, you will get no automatic IP address registration for "opnsense.my.do.main", so you probably want the second, too.
Title: Re: Wrong IP for opnsense host
Post by: Nikotine on April 24, 2024, 09:02:44 PM
Thanks, that worked.