This question is addressed in Kollár's paper
Simple normal crossing varieties with prescribed dual
complexes. For a variety $X$
with a (reduced, effective) simple normal crossing divisor $\Delta \subset
X$, write $\Delta = \bigcup_{i} D_{i}$ where $D_{i} \subset D$ are the
components. The **dual complex** $D(X, \Delta)$ is the simplicial complex
with

0-cells corresponding to the components $D_{i}$

1-cells corresponding to the *non-empty* intersections
$D_{i} \cap D_{j}$

2-cells corresponding to the *non-empty* intersections $D_{i} \cap
D_{j} \cap D_{k}$

and so on. (Part of) theorem 1 of that paper shows that given any
simplicial complex $\mathcal{C}$ of dimension $n-1$ there is a smooth,
projective, rational variety $X$ and a simple normal crossing divisor
$\Delta \subset X$ with rational components so that $D(X, \Delta)
\simeq C$ (*isomorphism*, not homotopy equivalence!).

When $X$ is a surface, the triple intersections are automatically
empty, so $D(X, \Delta)$ is a graph, the **dual graph** if you
will. So in this case the theorem says any 1-dimensional simplicial
complex can be realized as the dual graph of a simple normal crossing
divisor with rational components on a smooth rational surface.

**Remark**: the theorem I cited holds in all dimensions; it's
quite possible that there's an easier way to prove the result for
surfaces.