The error terms for the MA part of an ARIMA model are usually produced as part of the estimation routine - and are equal to the difference between the observed value and the fitted value. That means
a) you can't use simple linear regression to estimate your model - the values of the error terms depend on the coefficients of your model - so you can't include the error terms in a regression to generate those coefficients.
b) if you are using a model generated on one set of data to get forecasts for another set of data - using a method comparable to the one-step forecasts that Professor Hyndman describes on his blog here is probably the easiest way to get those.
c) if you want to generate the values to understand the math of what is going on - it is usually pretty easy to set up things in a spreadsheet. Calculate your forecast for period one. Subtract the forecast from the real value for that period to generate the error for period one. Use that error for period one (along with other relevant data) to calculate the forecast for period two - and so on. If you set up your spreadsheet right - this can simply involve creating the appropriate formulas once, then copying them down a column to get your values.
In any case - it is probably better to think of comparing your forecasts to your predictions via something like the Mean Absolute Scaled Error, or some other technique that evaulates how close your model projections are to the actual values seen in the data. Doing a simple linear regression of the real values on the projections is not a great way of doing this - it gives you a comparison value, but not between your projection and the value, but a linear transformation of your function and the value. Certainly, if you do the linear regression, and you get an intercept coefficient that is not equal (or at least close) to zero - or a slope coefficient that is not equal (or at least close) to one, it is a sign of a substantial problem with your model, no matter how good the goodness of fit statistics are from the regression