The experiment of Krasznahorkay textit{et al} observed the transition of a $rm{^{8}Be}$ excited state to its ground state and accompanied by an emission of $e^{+}e^{-}$ pair with 17 MeV invariant mass. This 6.8$sigma$ anomaly can be fitted by a new light gauge boson. We consider the new particle as a $U(1)$ gauge boson, $Z$, which plays as a portal linking dark sector and visible sector. In particular, we study the new $U(1)$ gauge symmetry as a hidden or non-hidden group separately. The generic hidden $U(1)$ model, referred to as dark $Z$ model, is excluded by imposing various experimental constraints. On the other hand, a non-hidden $Z$ is allowed due to additional interactions between $Z$ and Standard Model fermions. We also study the implication of the dark matter direct search on such a scenario. We found the search for the DM-nucleon scattering excludes the range of DM mass above 500 MeV. However, the DM-electron scattering for MeV-scale DM is still allowed by current constraints for non-hidden $U(1)$ models. It is possible to test the underlying $U(1)$ portal model by the future Si and Ge detectors with $5e^{-}$ threshold charges.