Carbon dots are emerging in the nanotechnology field as the newest class of fluorescent probes, owing to their high water-solubility, good chemical and photo-stability and tunable photoluminescence. The ability of metal cations to quench carbon dots fluorescence is already well known. Anyway, a dedicated study directed to the rational design of the optimal carbon dot probe is still missing. Herein we present a novel synthetic method for the production of carbon nanodots from an economic and environmental polluting starting material: olive solid wastes. The obtained carbon dots are efficiently quenched in presence of Fe3+, allowing the cation detection. Starting from a comprehensive study on their quenching mechanism, we have been able to develop effective strategies to modulate the sensing properties of these carbon dots. The sensitivity and linear range of the probe have been tuned by modulating the surface functionalization of the nanoparticles. The selectivity toward Fe3+ has been improved by growing around the dots a porous microsphere of ion imprinted polymer. The results highlighted in this work demonstrate that the carbon dots sensing properties can be modulated to meet the requirement of the users, allowing the design of tailored probes for a wide range of applications.