NAT client code