CustomMenu

Showing posts with label Ubuntu. Show all posts
Showing posts with label Ubuntu. Show all posts

Saturday, May 4, 2013

Node, Ubuntu Security POC

For my Ubuntu configuration of Node.js, there were six parts...listed below.  

The basic flow is for a router to forward to the port where the proxy is listening.  The iptables configuration allows non-LAN originated traffic to connect only to this proxy port.  This port is configured only for SSL.  


When the user hits the proxy port the user's browser is requested to provide its SSL client certificate.  If successful, the user attempts to authenticate with the primary Node.js application using the Node.js Passport module.  Authentication will be discussed in a later post.



1.  Node-http-proxy:


2.  SSL:


3.  Node SSL configuration:


4.  Browser SSL configuration:

  • The client certificates from step 2 will need to be manually loaded into each user's browser.  On the iPad, it seems that the certificates are only recognized by the Safari browser and not Chrome.

5.  Upstart Script:

6.  Monit Script:

  • To monitor the server, the Node-http-proxy, and the primary Node.js processes, I used Monit.  The instructions at the following link were helpful:
    http://howtonode.org/deploying-node-upstart-monit
  • See my Monit script on my Monit Script page in the nav bar.

Saturday, April 27, 2013

Node, Rabbit, Ubuntu Tech POC

For the machine hosting Node.js and RabbitMQ, I am using Ubuntu Linux 12.04 LTS Server 32-bit.  Here are the high level configuration steps:


  1. Download and install Ubuntu (http://www.ubuntu.com/download/server) on the target machine.
  2. Install the Gnome Classic desktop.
  3. Configure a static IP address for your server...I found this link helpful:
    https://help.ubuntu.com/12.04/serverguide/network-configuration.html
  4. Configure VNC...this link was helpful:
    http://rbgeek.wordpress.com/2012/06/25/how-to-install-vnc-server-on-ubuntu-server-12-04/ 
  5. Configure FTP...this link was helpful:
    http://en.kioskea.net/faq/7197-installing-an-ftp-server-under-ubuntu
  6. Install Node.js...here's the link:
    https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
  7. Install RabbitMQ:
  8. Secure the server:

That's about it ...

And at this point it cannot be accessed from the internet...only on the LAN.