1. A method for securing a managed forwarding element (MFE) that operates in a data compute node (DCN) executing on a host machine, the method comprising: receiving a notification that the MFE is loaded on the DCN, the MFE for implementing a set of logical forwarding elements of a logical network that logically connects the DCN to a plurality of other DCNs; and securing the MFE by isolating executable code and data of the MFE from executable code and data of other applications that execute in the DCN in a physical memory of the host machine by: receiving a plurality of memory mapping tables that map a physical memory of the DCN to the physical memory of the host machine; and dividing the plurality of memory mapping tables into first and second sets of memory mapping tables, wherein the first set of memory mapping tables maps physical memory of the DCN that contains executable code and data of the MFE to a first region of the physical memory of the host machine and the second set of memory mapping tables maps physical memory of the DCN that contains executable code and data of other applications that execute in the DCN to a second region of the physical memory of the host machine; wherein the secured MFE operating in the DCN processes data packets sent by the DCN to the plurality of other DCNs.