Rubbing alcohol will remove heavy gunk from the strings, but you need to be very careful to keep the alcohol away from the varnish. I would also avoid getting it on the fingerboard; regular exposure to moisture on the fingerboard will gradually warp the board.
Best way to clean a fingerboard is with very fine steel wool (grade 000 or 0000). Be sure to wipe up the board and top after with a dry hand towel. The steel fibers can scratch the varnish if not removed immediately.
When it comes to cleaning the varnish, you have many options and it can be a little complicated. Some varnishes are very soft or delicate and can be damaged by many cleaning products. This isn't an issue with most basses, but I would defer to an expert regarding which cleaning products work best for certain varnishes. It also helps to know whether the varnish is oil or spirit (alcohol) based.
If you have a lot of rosin dust caked on the top, a
citrus-based cleaner can work nicely. I've also had good luck with Kolstein cleaner and polish. Spit can also do the trick.