Deter flies and mosquitoes naturally by planting lavender in pots near doors and windows. Other herbs that work are basil, mint, eucalyptus and bay leaf.
Image from this blog.