  We derive an expression for the angular power spectrum of cosmic microwave
background anisotropies due to gravity waves generated by a stochastic magnetic
field and compare the result with current observations; we take into account
the non-linear nature of the stress energy tensor of the magnetic field.
  For almost scale invariant spectra, the amplitude of the magnetic field at
galactic scales is constrained to be of order 10^{-9} Gauss. If we assume that
the magnetic field is damped below the Alfven damping scale, we find that its
amplitude at
  0.1 h^{-1}Mpc, B_\lambda, is constrained to be B_\lambda<7.9 x10^{-6} e^{3n}
Gauss, for n<-3/2, and B_\lambda<9.5x10^{-8} e^{0.37n} Gauss, for n>-3/2, where
n is the spectral index of the magnetic field and H_0=100h km s^{-1}Mpc^{-1} is
the Hubble constant today.
