gateway master connections script.