Electrophysiological characterization of large protein channels, usually displaying multi-ionic transport and weak ion selectivity, is commonly performed at physiological conditions (moderate gradients of KCl solutions at decimolar concentrations buffered at neutral pH). We extend here the characterization of the OmpF porin, a wide channel of the outer membrane of E. coli, by studying the effect of salts of divalent cations on the transport properties of the channel. The regulation of divalent cations concentration is essential in cell metabolism and understanding their effects is of key importance, not only in the channels specifically designed to control their passage but also in other multiionic channels. In particular, in porin channels like OmpF, divalent cations modulate the efficiency of molecules having antimicrobial activity. Taking advantage of the fact that the OmpF channel atomic structure has been resolved both in water and in MgCl2 aqueous solutions, we analyze the single channel conductance and the channel selectivity inversion aiming to separate the role of the electrolyte itself, and the counterion accumulation induced by the protein channel charges and other factors (binding, steric effects, etc.) that being of minor importance in salts of monovalent cations become crucial in the case of divalent cations.