Dense nuclear matter is expected to be anisotropic due to effects such as solidification, superfluidity, strong magnetic fields, hyperons, pion-condensation. Therefore an anisotropic neutron star core seems more realistic than an ideally isotropic one. We model anisotropic neutron stars working in the Krori–Barua (KB) ansatz without preassuming an equation of state. We show that the physics of general KB solutions is encapsulated in the compactness. Imposing physical and stability requirements yields a maximum allowed compactness 2GM/Rc^2 < 0.71 for a KB-spacetime. We further input observational data from numerous pulsars and calculate the boundary density. We focus especially on data from the LIGO/Virgo collaboration as well as recent independent measurements of mass and radius of miilisecond pulsars with white dwarf companions by the Neutron Star Interior Composition Explorer (NICER). For these data the KB-spacetime gives the same boundary density which surprisingly equals the nuclear saturation density within the data precision. Since this value designates the boundary of a neutron core, the KB-spacetime applies naturally to neutron stars. For this boundary condition we calculate a maximum mass of 4.1 solar masses.