1. A method for configuring a logical middlebox in a hosting system comprising a set of nodes, the logical middlebox part of a logical network comprising a set of logical forwarding elements that connect a set of end machines, the method comprising: receiving a set of configuration data for the logical middlebox; using a stored set of tables describing physical locations of the end machines to identify a set of nodes at which to implement the logical middlebox; and providing the logical middlebox configuration for distribution to the identified nodes.