Let $ X \subset \ R ^ n $ be a closed convex set and
 let $ L $ be a straight line such that $ X \cap L = \emptyset $.
 Does there exist a hyperplane containing
$ L $ that does not intersect $ X $ ?


In the classical Hahn-Banach theorem we require $X$ to be open.



On the geometric Hahn-Banach theorem
Not necessarily: consider a 3-D space, let $L$ be the $x$ axis, and let the convex set be $$X=\bigl\{(x,y,z):z\geqslant (\max\{0,y + e^x\})^2\bigr\}.$$ This is the region above the graph of a convex function; here's a [3-D plot](https://www.wolframalpha.com/input/?i=Plot3D%5BMax%5By%2BExp%5Bx%5D,0%5D%5E2,%7Bx,-2,2%7D,%7By,-2,2%7D%5D). After projecting on the $yz$ plane, the convex set becomes $$X' = \{(y, z) : y < 0 , \, z \geqslant 0\} \cup \{(y, z) : y \geqslant 0, z > y^2\}.$$ There is no line in the $yz$ plane that contains the origin and does not intersect $X'$, and hence there is no hyperplane that contains the $x$ axis and does not intersect $X$.


