We investigate the interaction of two Mn ions in the dilute magnetic semiconductor GaMnAs using the variational envelope wave function approach within the framework of six band model of the valence band. We find that the effective interaction between the Mn core spins at a typical separation d is strongly anisotropic for active Mn concentrations less than x = 1.3%, but it is almost isotropic for shorter distances (d < 13A). As a result, in unannealed and strongly compensated samples strong frustration effects must be present. We also verify that an effective Hamiltonian description can be used in the dilute limit, x < 1.3%, and extract the parameters of this effective Hamiltonian.