Use an extender for a socket wrench ( like this )
Put it in the part of the fork tube thats no the legs side ( the top ), then pound it out through the bottom using a hammer.
Hitting the starnut in the fork with the socket extender in the fork, and then hitting the extender with the hammer.
You can use any pipe that fits inside the fork if you don't have a socket extender.