  In the framework of Einstein's the theory of general relativity we present a
new interior solution with a perfect fluid, this is constructed from the
proposal of a gravitational redshift factor. The geometry is regular and its
density and pressure are monotonic decrescent functions, furthermore the sound
speed is smaller than the light speed and monotonic crescent. The solution
depends on a parameter $w \in (0, 2.0375509325]$ related to the compactness of
the star $u = GM/c^2 R$, the maximum value $u = 0.2660858316$ which allow to
describe compact stars like quark stars or neutron stars. Although there is a
diversity of stars for which the model can be used, we only apply this solution
to describe the interior of a neutron star PSR J0348$+$0432. According to the
observations, it is known that its mass $M = (2.01 \pm 0.04)M_{\odot}$ and its
radius is between 12.062Km and 12.957Km, so the value of the compactness is in
the range $u \in [0.2244845, 0.2509338]$. In addition to the decreasing
behavior of the mentioned pressure and density functions, the results are
consistent with the density values range typical of neutron stars and the
maximal central density of the star result to be 1.283818 $\times 10^{18}
Kg/m^{3}$.
