Hi,
what is the version of DietPi you are running? And do you recall of you activated killswitch? There was a challenge before DietPi v7.3 to have SSH blocked while having killswitch activated.
https://dietpi.com/forum/t/cant-ssh-after-enabling-dietpi-vpn-killswitch/5381/1
https://github.com/MichaIng/DietPi/commit/cbad2b84702c0a18c68eb5b5da591dee92988080