From the variational principle for the total internal energy of a neutrons star and some restrictions on the form of the metric coefficients, we have found equations of equilibrium which are valid for every metric theory of gravitation. We also present some simple solutions of the equations to find the neutron stars maximum mass.