How did the Allies defend against German U-boats in WW1?

by throwittomebro
thefourthmaninaboat

I've written about this in detail here. /u/mikedash's comment in the same thread is also worth a read.