Monday, October 24, 2016

Setting up rocketchat on a UBUNTU 16.04 server

Steps to install on UBUNTU 16.04

1.     Perform the basic install of Unbutu 16.04 server.
Using the default drive sizing settings etc are probably fine, especially if you are testing this.

         Set an appropriate username (ex.  Administrator)
         Set the appropriate country
         Set the appropriate timezone
         Set Hostname (ex Rocketchat)

2.     When installation is completed, server will reboot.

3.     Log into the server and reboot the box again (Weird Ubuntu thing I’ve encountered in the past)
Reboot [enter]

4.     Box restarts, log in and do the following:

5.     sudo apt-get update
6.     sudo apt-get dist-upgrade
(this will take 30 minutes probably)

7.     sudo snap install rocketchat-server
8.    reboot

9.     If you want to hardcode an IP,  eetup IP address by editing the file:  /etc/network/interfaces/
iface eth0 inet static
address x.x.x.x
netmask x.x.x.x
gateway x.x.x.x

10.  Save your changes
11.  Reboot

By default RocketChat uses port 3000 so, if you want to forward standard :80 port, you can do it with this in UBUNTU with this following commands

sudo iptables -t nat -I OUTPUT -p tcp -d 127.0.0.1 --dport 80 -j REDIRECT --to-ports 3000
sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 3000

Done!  You should now be, by default, http://IPofYourServer:3000 and be prompted by a rocketchat webpage.
Register as a new user, this user will automatically become the Administrator user.
You can go in an resign this permission to other users, so its not permanent.

Should you wish to update it.  These commands will help:

"snap find rocketchat-server" will pull the SNAP repository for the latest version.

"sudo snap refresh rocketchat-server" will update your version to the latest.  Takes a minute or so usually to download, the upgrade is under a minute and users probably will just see some "reconnecting" indications if they are logged in, but usually only takes 10-20 seconds for the service to restart.  Everyone will automatically log back in.

If running the above sudo command gives you an error similar to the following:
bla bla bla assumes unsupported features: snapd2.23 

Try the following command:

sudo apt update sudo apt install snapd

The re-run the snap find/snap refresh commands again. You should be good to go.

Friday, October 21, 2016

Aligning two different sets of data in excel with each other

Here is how to align two different sets of data in excel each set containing multiple rows, but only one common element between the two to use as a 'key'.

This will explain a way to make the data on the left, become the data on the right. We are using "USER ID" as the common value between the two groups


Put each set of data into its own EXEL tab



In my example I want the data in Sheet2 to be put into Sheet1.  
So on Sheet2, select all the data

When you select in, the box in the upper left corner of Excel that normally shows you which cell(s) are select, type in MyData into that box



Here's some Excel Vlookup magic.


Go to Sheet 1 and select the first box to the right of the first row of data that you want matching data to start being displayed.  In my example below i'm putting into C2

and enter this code in

=vlookup($A2,MyData,1,false)


Next put in this into your next column, in my example it will be D2
You will notice

                                        =VLOOKUP($A2,MyData,2,FALSE)



Now do a select and auto fill by selecting the cells you put in the code, and double clicking the autofill dot that appears in the lower right corner of the selection


You should see data fill in like this:


The way the code basically works is
($ColumnWithCommonValueToMatch, DataName, ColumnNumber, code)

=vlookup($a2,MyData,1,false)

=vlookup($a2,MyData,2,false)

=vlookup($A1,MyData,3,false)


Monday, October 3, 2016

Tether an iPhone to router for Internet access

Scenario:
The ISP providing internet to your office/home network (wired and wireless) is unavailable and you need internet to work again.  The method described here will allow you to have multiple connections through your iPhone's data plan using your existing SOHO router.

To use your iPhone with your router, you will need to utilize a computer that will host the connection between your iPhone and your router.  You can still use this machine for internet access, however it will have limited access to your LAN resources since it is 'outside' the network.




(Mobile Network Data) <-> iPhone <-> Host Computer <-> Router <-> (wired/wireless LAN)
  1. On the host computer, (tested on windows 7 and 10), plug your iPhone into it with the USB cable.
  2. Enable Personal Hotspot
  3. When prompted with this message, select USB ONLY
  4. After 30 secs or so, windows SHOULD recognize this as a device in your computer network settings.
  5. Now select the "Apple Mobile Device Ethernet", hold down the CTRL key and click on the Local Area Connection that coincides with the Ethernet port of your host computer.

  6. Right click on this and then select BRIDGE CONNECTIONS.  You'll see this message appear.
  7. Then you'll see a new network device show up....
  8. Give it a minute or so, but eventually you'll see this:
  9. You'll see the new Ethernet device show up as "iPhone"
  10. (On the host computer, you'll see that the iPhone has provided the new "Ethernet 2" connection an IP of 172.20.10.2, and the iPhone itself has the ip of 172.20.10.1  )

  11. Now plug in the host computer into your router's "WAN" port
  12. Depending on the router model/design, you may have some due diligence to allow it to accept this new connection.  The router has to obtain a proper WAN side ip, in our example, it would be an IP of 172.20.10.X


Once your router has obtained the IP from the host computer/iPhone bridge, then your machines that are connected to this router through a wired and/or wireless connection will now have internet access.

Your router LAN IP structure will stay exactly the same, so all your local users should still have access to the same local resources they are used to.  The router will automatically make the internet available to these users.

Remember, all these machines will be using your data plan, so be cautious of usage!