read GATEWAY_PORT when set