Re: connecting to digikam mariadb host from two different subnet

leoutation-W9aAOI/[email protected] Mon, 1 Jun 2026 10:14:07 +0200
Newsgroups gmane.comp.kde.digikam.user
Message-ID <[email protected]>
On 5/29/26 9:18 PM, Daniel Bauer wrote:
>=20
>=20
> Am 29.05.26 um 18:56 schrieb leoutation-W9aAOI/[email protected]:
>> Hi
>> I use Digikam/Mariadb with address/static/hostname like 192.168.2.xx=20
>> on local ethernet network, in same computer subnet. It runs fine when=
=20
>> connecting from two machines in same subnet.
>> When using wireless/static address on a computer,=C2=A0 subnet is=20
>> different, computer address is now 192.168.3.xx
>> So, I'm unable to connect to digikam db , hostname 192.168.2.xx now=20
>> when using wireless
>> Is there a way to configure digikam and/or mariadb to connect to same=
=20
>> digikam mariadb hostname from different subnet ?
>> Thanks
>=20
> This is not a digikam but a network problem. You cannot directly connect=
=20
> to a machine in another subnet than its own.
>=20
> The easiest solution is to connect both computers to the same subnet=20
> (e.g. both same ethernet, or both same wifi).
>=20
> If you can't, you need routing between the subnets and set up your=20
> router accordingly or add routes manually on the computers using the=20
> "route add" command.
>=20
> You can also install Tailscale or ZeroTier on both computers; they=20
> connect regardless of subnets/firewalls.
> Or use WireGuard: Lightweight VPN.
> Or mDNS / Avahi: For hostname resolution (.local names) across subnets=
=20
> (install Avahi on Linux, enable Bonjour on Windows/macOS).

I forgot to say I use Arch Linux, systemd-network and iwd
I solved the problem in a very simple way with IP aliasing
Just run
ip addr add 192.168.2.xx/24 dev wlan0

To make the change permanent, I add ethernet/digikam address in=20
/etc/systemd/network/26-wireless.network

[Network]
Address=3D192.168.3.xx/24    #wireless
Address=3D192.168.2.xx/24    #ethernet added line

For other distributions/configurations, good explanations here
https://www.linuxboost.com/a-step-by-step-guide-on-how-to-set-up-ip-aliasi=
ng-on-linux/
https://penguintutor.com/linux/networking-ip-alias-tutorial

>=20
> Search for your best solution in network manuals/forums for your=20
> operating system and router type.
>=20
>=20
>=20