We propose a method to do constrained parameter estimation and inference from neuroimaging data using general linear model (GLM). Constrained approach precludes unrealistic hemodynamic response function (HRF) estimates to appear at the outcome of the GLM analysis. The permissible ranges of waveform parameters were determined from the study of a repertoire of plausible waveforms. These parameter intervals played the role of prior distributions in the subsequent Bayesian analysis of the GLM, and Gibbs sampling was used to derive posterior distributions. The method was applied to artificial null data and near infrared spectroscopy (NIRS) data. The results show that constraining the GLM eliminates unrealistic HRF waveforms and decreases false activations, without affecting the inference for "realistic" activations, which satisfy the constraints.