An inertial electrostatic confinement (IEC) fusion device is possibly used for portable neutron sources. R. L. Hirsh reported that D-D the neutrons of 1.8 × 108 n/s were produced. Recently, the similar amounts of fusion reactions are observed to occur in IEC devices In the most of IEC devices, since gas pressure is so high that the ions lose their energy by the frequent collisions with the neutral gas. The conditions of the high voltage and the low pressure are preferable because the energy of beam ions is kept very high and used for the fusion reaction more efficiently. It, however, is difficult to produce enough amounts of ions through a glow discharge at the low pressure. One of the solutions is to equip the ion source such as a magnetron near the anode. We have made three-dimensional orbit following code to evaluate the life of the ions produced near the anode surface. The code includes atomic collisions with background neutral gas and indicates the optimal positions to equip ion source which gives longer life of accelerated ions.