Inline water filter for washing machines