1. A method for configuring a logical middlebox in a hosting system comprising a plurality of nodes, the method comprising: receiving a set of configuration data for the logical middleboxical network comprising a set of logical forwarding elements that connects a set of end machines; using a stored set of tables describing physical locations of the end machines to identify a set of nodes that hosts at least a subset of the end machines of the logical network; and providing the logical middlebox configuration data for distribution to the identified set of nodes that host the subset of the end machines of the logical network in order to implement the logical middlebox on the identified set of nodes.