Run the following in your client machine
ssh -R EXPOSED_PORT:localhost:SERVICE_PORT USER@HOST
Where
- EXPOSED_PORT is the port exposed to the internet in the proxy server
- SERVICE_PORT is the port your application is listening in your machine
| # This is shorthened version of blog post | |
| # http://ksopyla.com/2017/02/tensorflow-gpu-virtualenv-python3/ | |
| # update packages | |
| sudo apt-get update | |
| sudo apt-get upgrade | |
| #Add the ppa repo for NVIDIA graphics driver | |
| sudo add-apt-repository ppa:graphics-drivers/ppa | |
| sudo apt-get update |
| server { | |
| listen 443 ssl; | |
| server_name xxx.xx.io | |
| ssl on; | |
| ssl_certificate /etc/asterisk/certs/xxx.io.pem; | |
| ssl_certificate_key /etc/asterisk/certs/xxx.io.key; | |
| ssl_session_timeout 5m; |
Info: https://www.nginx.com/resources/admin-guide/nginx-https-upstreams/
Source: http://nategood.com/client-side-certificate-authentication-in-ngi
This is SSL, so you'll need an cert-key pair for you/the server, the api users/the client and a CA pair. You will be the CA in this case (usually a role played by VeriSign, thawte, GoDaddy, etc.), signing your client's certs. There are plenty of tutorials out there on creating and signing certificates, so I'll leave the details on this to someone else and just quickly show a sample here to give a complete tutorial. NOTE: This is just a quick sample of creating certs and not intended for production.
| # Author: | |
| # Wim Looman | |
| # Copyright: | |
| # Copyright (c) 2010 Wim Looman | |
| # License: | |
| # GNU General Public License (see http://www.gnu.org/licenses/gpl-3.0.txt) | |
| ## User interface, just set the main filename and it will do everything for you | |
| # If you have any extra code or images included list them in EXTRA_FILES | |
| # This should work as long as you have all the .tex, .sty and .bib files in |
| # Written by Brendan O'Connor, brenocon@gmail.com, www.anyall.org | |
| # * Originally written Aug. 2005 | |
| # * Posted to gist.github.com/16173 on Oct. 2008 | |
| # Copyright (c) 2003-2006 Open Source Applications Foundation | |
| # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # |
| graph = { | |
| 1: {2:1,5:1}, | |
| 2: {1:1,3:1,5:1}, | |
| 3: {2:1,4:1}, | |
| 4: {3:1,5:1,6:1}, | |
| 5: {1:1,2:1,4:1}, | |
| 6: {4:1} | |
| } | |
| time = 0 |
| import keras.backend as K | |
| import multiprocessing | |
| import tensorflow as tf | |
| from gensim.models.word2vec import Word2Vec | |
| from keras.callbacks import EarlyStopping | |
| from keras.models import Sequential | |
| from keras.layers.core import Dense, Dropout, Flatten | |
| from keras.layers.convolutional import Conv1D |
| # LVDB - LLOOGG Memory DB | |
| # Copyriht (C) 2009 Salvatore Sanfilippo <antirez@gmail.com> | |
| # All Rights Reserved | |
| # TODO | |
| # - cron with cleanup of timedout clients, automatic dump | |
| # - the dump should use array startsearch to write it line by line | |
| # and may just use gets to read element by element and load the whole state. | |
| # - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands. | |
| # - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump! |
| #ifndef __GZIP_H__ | |
| #define __GZIP_H__ | |
| #include <sstream> | |
| #include <boost/iostreams/filtering_streambuf.hpp> | |
| #include <boost/iostreams/copy.hpp> | |
| #include <boost/iostreams/filter/gzip.hpp> | |
| class Gzip { | |
| public: |