5. If the line $a x-b y+1=0$ bisects the circumference of $C$ : $x^{2}+y^{2}+2 x-4 y+1=0$, then the range of values for $a b$ is ( ).
(A) $\left(-\infty, \frac{1}{4}\right]$
(B) $\left(-\infty, \frac{1}{8}\right]$
(C) $\left(0, \frac{1}{4}\right]$
(D) $\left(0, \frac{1}{8}\right]$
5. B.

Since the circumference of the circle is bisected by the line, the center of the circle $(-1,2)$ lies on the given line, i.e.,
$$
\begin{array}{c}
-a-2 b+1=0 \Rightarrow a+2 b=1 \\
\Rightarrow a b=(1-2 b) b=-2 b^{2}+b \\
=-2\left(b-\frac{1}{4}\right)^{2}+\frac{1}{8} \leqslant \frac{1}{8} .
\end{array}
$$

Equality holds if and only if $b=\frac{1}{4}$.
Thus, $a b \in\left(-\infty, \frac{1}{8}\right]$.