Multiple IPs - Connection Error

My TrueNAS has multiple IPs, and only one is reachable via VPN.
Connect picks the “wrong” one and assigns that to the generated DNS name [192-168-31-17.somethingsomething.truenas.direct].
This, predictably, causes “Connection Error”.
Is there a way to pick the reachable IP or override what gets put into the DNS record?

Do you have multiple IPs on multiple interfaces but in the same network?

That doesn’t work.

Technically they are separate networks (they have separate interfaces in ipconfig).
The VPN interface has its own IP, and the LAN interface local IP isn’t routed via the VPN. So the machine is reachable via its VPN IP, and that was also the IP I accessed the TrueNAS GUI with when I added the machine to Connect.

OK - then I am probably at my end of ideas, because I do not know what “Connect” is and here I am in control if my DNS which is Unbound on OPNsense so I place the records I want in there.

Connect = TrueNAS Connect
It creates a DNS entry and a certificate for that DNS entry when you add a machine, so that you can view the machine without messing with certs.

Ah - this new thing. Sorry, no experience. Here VPN is something I run on my own infrastructure, not something in the cloud.

The architecture of TrueNAS Connect is pretty good, I’m impressed how much thought has gone into it. It requires a connection from the viewer to the NAS in question (but making it easier by creating a DNS cert for you). It is a neat way to aggregate various NASes from various networks while preserving security.

@rmr Currently TrueNAS Connect will pull from all interfaces for valid connection endpoints. While we do not support custom interface or IP configuration through the UI at this time, you can change the settings through the following in shell:

midclt call tn_connect.update '{"use_all_interfaces": false, "interfaces": [], "ips": []}'

And supply either explicit interfaces or ips to use.

1 Like

Thank you, this worked using the IP.
I tried the interface but there it claimed that the “interface name does not exist”, perhaps because it was created after the GUI started? It is listed in the “ip a” output.

I’m not sure, you could compare the result of midclt call interface.query and see. TrueNAS explicitly excludes USB NICs, the result of midclt call interface.internal_interfaces, and interfaces cloned on the NAS but not from the UI. See if your interface is in one of those categories.

Yes, it was wg0 and “wg” is in the list of “internal interfaces”. “tailscale” is listed as well, probably easier to reproduce using the Tailscale app.
The alternate workaround is to subnet-route the original IP via wg0, but since it isn’t static (unlike the wg0 IP), I like the original workaround better.