  This paper is devoted to study the possibility of forming anisotropic compact
stars in modified Gauss-Bonnet, namely called as $f(G)$ theory of gravity which
is one of the strong candidates,responsible for the accelerated expansion of
the universe. For this purpose, we have used analytical solution of Krori and
Barua metric to the Einstein field equations with anisotropic form of matter
and power law model of $f(G)$ gravity. To determine the unknown constants in
Krori and Barua metric, we have used the sample of compact stars, 4$U$1820-30,
Her X-1, SAX J 1808-3658. The physical behavior of these stars have been
analyzed with the observational data. In this setting, we have checked all the
regularity conditions and stability of the compact stars 4$U$1820-30, Her X-1,
SAX J1808-3658.
