A gateway for connecting a public network to an internal network is
provided. The gateway comprises a control unit for controlling
transmission of incoming and/or outgoing data between a remote device in
the public network and an internal device in the internal network; a
public port connected to the public network; an internal port connected
to the internal network; and a storage unit storing a list of public key
identifiers and respectively associated internal network addresses of
internal devices; wherein the control unit is adapted for identifying a
destination of the incoming data, which are addressed to a public network
address of the gateway, by determining an internal network address of the
internal device based on public key information included in the incoming
data and the list of public key identifiers and associated internal
network addresses.