dietpi Wifi connected to my home router with gateway 192.168.1.1, that’s where it gets internet and how my other devices can connect to my dietpi using ssh
Ethernet has 192.168.0.1 gateway and 192.168.0.2 as ip, this is for my ps2, on the ps2 i set gateway to 192.168.0.2. Dietpi has a server that ps2 connects to for loading backups basically and also that’s how i can send commands to the ps2 easily from when im connected using ssh
This was all working until i decided to change settings (using dietpi-config) and set the dietipi wifi ip to be static instead of dhcp, After that i would be able to successfully connect with ssh as usual but when logged in after a few seconds the connection would interrupt forcing me to close terminal. Even trying to go back to previous wifi settings (back to dhcp) the problem remains. This is a setup i didn’t do myself and i don’t know how to replicate it again
Anyone know how to make my setup work again please?
Generally, you cannot have two gateways assigned on the same system. Depending on which network interface is brought up first, the 2nd will fail to configure, as a default route (gateway) exists already.
As you use WiFi for Internet access, that one needs to have the gateway assigned. The Ethernet interface is used only to access a secondary LAN, and to allow the PS2 accessing it, AFAIU? For that, you do not need to assign a gateway on the Ethernet interface. Just set that empty. The routes to send all packets to 192.168.0.0/24 through the Ethernet interface are created in any case, so you can still access that network vice versa.
Not sure yet whether this solves to SSH connection drops, which sound like some asynchronous communication happening. But a starting point from which we can further debug, if I understood the intended setup correctly.