problems with dual network.

Hi guys recently I encountered a problem with my dietpi in dual network, here is the situation:

I have two networks.
one[1] is an local network used for some local web services, whose router-ip is 10.10.10.10
the other[2] connected to an Internet for online-use, whose router-ip is 192.168.1.1

Respectively, I tried access to network[1] via Ethernet successfully, and network[2] via WiFi successfully, too. But when both connected to dietpi, it got a mess:
I cannot access dietpi from computer(whose ip is 10.10.10.121) in local network or fom iphone(whose ip is 192.168.1.113) under the WiFi.

I googled it but the solution is for ubuntu using the command ‘ipconfig’ or ‘route’, which are not installed in dietpi. what should I do? Can I apt isntall an ‘ipconfig’ and follow the google solution or is there a dietpi-way for this? would it(ipconfig or route) broken the exist dietpi-config of network?

thanks for all of your reply!

Actually I just want to access to a few ip in the local network(among 10.10.10.1-10.10.10.255) via dietpi, the most common scene is completed online through the WiFi router (192.168.1.1).

Hi,

merry Xmas and thanks for your message.

I googled it but the solution is for ubuntu using the command ‘ipconfig’ or ‘route’, which are not installed in dietpi.

ifconfig has been officially deprecated years back and was replaced by the ip suite

thank you for your reply!

i just googled the usage of ‘ip route’, I think it can solute my problem.

but there is a new question, I cannot connect to two route via Ethernet&WiFi at the same time using dietpi-config

when one connected, another disconnected at the same time.what should I do?

The trick here is to connect to the network 1, the local one, without applying the default gateway, or applying the gateway with a higher metric.
Therefore the gateway of the connection 2 which can get you to the internet will be the only one or the preferred one with a lower metric.