Chains in the presence of an interacting surface and different boundary conditions