It really depends on what is meant by the "sum of all the natural numbers". The series is divergent in the usual sense. Nevertheless, the statement is correct if understood in a regularization sense, i.e. looking at the analytic continuation of the Riemann zeta function to -1. Mathematica knows that
In[1]:= Zeta[-1]
Out[1]= -(1/12)
In[2]:= Sum[n^-s, {n, 1, Infinity}] /. s -> -1
Out[2]= -(1/12)
See
this or
this Wikipedia articles for more details.