Patent ID: 8751691

Claim:
A provider network, comprising: one or more server devices configured to: assign subsets of a plurality of public Internet Protocol (IP) addresses to customers as customer IP addresses and assign subsets of a plurality of resource instances on the provider network to the customers as customer resource instances; map the customer IP addresses to particular ones of the customer resource instances on the provider network; remap at least one of the customer IP addresses to a specified endpoint on a customer network external to the provider network; and maintain mapping information that indicates current mappings of the customer IP addresses to the customer resource instances on the provider network and current remappings of the customer IP addresses to specified endpoints on the customer networks external to the provider network; one or more network devices configured to: receive packets from client devices, the packets indicating a customer IP address as a destination address and an IP address of the client device as a source address; for at least some of the packets, determine, from the mapping information, whether the customer IP address indicated by the destination address of the packet is currently mapped to a customer resource instance on the provider network or is currently remapped to an endpoint on a customer network external to the provider network; based on the determination: for a packet for which the customer IP address is currently mapped to a customer resource instance on the provider network, send the packet to the respective customer resource instance via the provider network; and for another packet for which the customer IP address is currently remapped to an endpoint on a customer network external to the provider network: translate the destination address of the packet to determine a network address of the endpoint on the customer network; modify the packet to indicate the network address of the endpoint on the customer network as a destination address; and send the modified packet onto a public network to be routed to the customer network over the public network.