Iphone 2g has two boards one is the main board with the processor and the second one which is connected on top of the first one which has the modem chip, bluetooth chip and the wifi chip and also the imei no is stored in this board.
The problem of error 23 is basically due to modem chip.
In 3g and 3gs there is only one main board which contains all the ic's including the modem chip, the modem chip is the one which we used to remove while hardware unlocking.
so to repair this fault in 3g or 3gs you will have to take a bit risk and remove that chip carefully because it is sealed and there are chances of the tracks on board being broken, after removing it just reball it and fix it on the board that's the only solution for now.
For 2g you can do the same procedure or just change the upper board.
I have tried it by myself.