We consider the harmonic crystal, or massless free field, ϕ = {ϕ x } x∈Z d , d ≥ 3, that is the centered Gaussian field with covariance given by the Green function of the simple random walk on Z d . Our main aim is to obtain quantitative information on the repulsion phenomenon that arises when we condition ϕ x to be larger than σ x , σ = {σ x } x∈Z d is an IID field (which is also independent of ϕ), for every x in a large region D N = ND ∩ Z d , with N a positive integer and D a bounded subset of R d . We are mostly motivated by results for given typical realizations of σ (quenched set-up), since the conditioned harmonic crystal may be seen as a model for an equilibrium interface, living in a (d + 1)-dimensional space, constrained not to go below an inhomogeneous substrate that acts as a hard wall. We consider various types of substrate and we observe that the interface is pushed away from the wall much more than in the case of a flat wall as soon as the upward tail of σ 0 is heavier than Gaussian, while essentially no effect is observed if the tail is sub-Gaussian. In the critical case, that is the one of approximately Gaussian tail, the interplay of the two sources of randomness, ϕ and σ , leads to an enhanced repulsion effect of additive type. This generalizes work done in the case of a flat wall and also in our case the crucial estimates are optimal Large Deviation type asymptotics as N ∞ of the probability that ϕ lies above σ in D N .