The Zaremba problem is a mixed boundary value problem where the Dirichlet condition is imposed on a set with positive capacity, as per Mazya's condition, rather than necessarily on a set of positive measure. This allows the Dirichlet condition to be defined on fractal-like sets, such as Cantor-type sets. We establish results for the local Zaremba problem for the Laplacian and the p-Laplacian with degenerate weights. For the nonlocal case, we propose a well-posed formulation of the Zaremba problem and derive foundational existence and regularity results. This talk is based on joint projects with Ho-Sik Lee (Bielefeld) and ongoing work with Guy Foghem (Dresden).