Premixed combustion strategies have the potential to achieve high thermal efficiency and to lower the engine-out emissions such as NOx. However, the combustion is initiated at several kernels which create high pressure gradients inside the cylinder. Similarly to knock in spark ignition engines, these gradients might be responsible of important pressure oscillations with a harmful potential for the engine. This work aims to analyze the in-cylinder pressure oscillations in a dual-fuel combustion engine and to determine the feedback variables, control actuators, and control approach for a safe engine operation. Three combustion modes were examined: fully, highly, and partially premixed, and three indexes were analyzed to characterize the safe operation of the engine: the maximum pressure rise rate, the ringing intensity, and the maximum amplitude of pressure oscillations (MAPO). Results show that operation constraints exclusively based on indicators such as the pressure rise rate are not sufficient for a proper limitation of the in-cylinder pressure oscillations. This paper explores the use of a knock-like controller for maintaining the resonance index magnitude under a predefined limit where the gasoline fraction and the main injection timing were selected as control variables. The proposed strategy shows the ability to maintain the percentage of cycles exceeding the specified limit at a desired threshold at each combustion mode in all the cylinders.