Anyone have organic/natural/diy flea and tick prevention products that work?

I remember years ago my parents giving my dog garlic pills to stop fleas. I was young so I don't know the details.