A more general and realistic four-component magnetized plasma medium consisting of opposite polarity ions and nonthermal distributed positrons and electrons is considered to investigate the stable/unstable frequency regimes of modulated ion-acoustic waves (IAWs) in the D-F regions of Earth's ionosphere. A (3 + 1)-dimensional nonlinear Schrödinger equation, which leads to the modulation instability (MI) of IAWs, is derived. The parametric regimes for the existence of the MI, first-and second-order rogue waves, and also their basic features (viz., amplitude, width, and speed) are found to be significantly modified by the effect of physical plasma parameters and external magnetic field. It is found that the nonlinearity of the different types of electronegative plasma system depends on the positive to negative ion mass ratio. It is also shown that the presence of nonthermal distributed electrons and positrons modifies the nature of the MI of the modulated IAWs. The implication of our results for the laboratory plasma [e.g., (Ar + , F −) electronegative plasma] and space plasma [e.g., (H + , H −), (H + , O − 2) electronegative plasma in D-F regions of Earth's ionosphere] are briefly discussed.