January 2018 archive

CentOS 7 Minimal Installation on Hyper-V

CentOS Minimal Installation Tutorial

This tutorial will show you how to install CentOS minimal on a Hyper-V virtual machine. We will also focus on getting network connectivity.

Before we begin this tutorial, please head over to centos.org and grab a copy of the latest ISO of CentOS Minimal, link below.

Download Centos

Creating the virtual machine:

CentOS Download

Once you’ve downloaded your ISO, on your server or workstation running Hyper-V, launch the Hyper-V management console.

Hyper-V Management

Within the management console, right click on your server, and select “New” and then “Virtual Machine”

New VM - Hyper-V

Give your new VM a name and instruct Hyper-V on where to store the config files.

Hyper-V Name and Location VM

Select the amount of memory you want your virtual machine to have. In my case, I have chosen to give mine 1024mb or 1gig.

Hyper-V Memory

Pick your network connection (this is your virtual switch) and click “next”

VM Lan

Once you’ve assigned your new VM a network connection, you need to create a virtual hard disk for it. Select “Create Virtual Hard Disk” from the menu, give it a name, select the location you wish to save it in and the size.

Create VHD Hyper-V

Now we must tell Hyper-V where to find the CentOS ISO that we downloaded. Select “Install an operating system from a boot CD/DVD-ROM” pick the “Image File (.iso)” option. Click on “Browse” and locate the ISO. Then click “Next”

Select ISO File

Finally a summary page will be displayed. This will tell you all of the options that you selected for your virtual machine. At this step, please click on “Finish.” Clicking “Finish” will bring you back to the Hyper-V management console.

Hyper-V Summary

In the Hyper-V management console, find your newly created virtual machine, select it and right click. Click on the “Connect” option that appears.

Hyper-V Connect

Go ahead and click on the green power button to fire up your VM.

Hyper-V Connect

Installing CentOS on your Virtual Machine

Your virtual machine will now begin to read the ISO inserted into it’s virtual optical drive. Using the arrows on your keyboard, highlight the “Install CentOS 7” and hit the enter key.

CentOS ISO - Install

Select your language. In my case, I left it as the default of English. Then click continue.

CentOS Pick Language

Select the disk on which you wish to install CentOS. I typically allow CentOS to use the automatic partitioning feature. Then click “Done”

CentOS Disk Install

During the installation, you are asked to set a root password and/or create a user. I have chosen to do both. You may click each icon and assign a password and create a user. CentOS will then set these during it’s installation.

Create User Root Pass

User Pass Created

Allow CentOS to complete it’s installation process. Once this step is complete, the virtual machine will reboot. Once it has rebooted, you will see the following prompt. Here you can login with either your root user or the user you had CentOS create during installation. CentOS is now installed.

CentOSInstalled

Gaining Network Access

CentOS minimal out of the box on Hyper-V will not get an IP Address. You can verify this by logging in and issuing the command “ip addr”

CheckIP

If you get an IP address, you should see it listed under “eth0” – in this case we do not see an IP address. This is because CentOS does not go out and try to grab an IP on boot. In order to change this, you must issue the command, “vi /etc/sysconfig/network-scripts/ifcfg-eth0”CentOS Eth0 Conf

To change this config, hit the “i” key to switch vi into insert mode. Arrow down until you get to the last entry, “ONBOOT”, you must change this from “no” to “yes” – when you’ve changed this, hit the : key and type wq to write the changes and quit vi.

Change_OnBootYes

Restart your network interface by issuing the command “systemctl restart network” – CentOS will hang for a moment and then restart the network adapter.

CentOS Restart Network

Now you can issue the command “ip addr” again and you should see an IP address listed for interface eth0.

CheckIPAgain

You now have a base CentOS Minimal install with network connectivity. This will give you a great base to install Nagios. I will be writing a tutorial shortly on the installation and configuration of Nagios Core on CentOS.

 

Check out some of my other blogs on Hyper-V!

Permanent link to this article: https://achubbard.com/2018/01/31/centos-7-minimal-installation-hyper-v/

Feeding Ubiquiti Cameras into Blue Iris

Background

When it comes to security cameras, I have pretty much been an advocate for anything Ubiquiti. Especially when there is a budget to work with. Their cameras are fairly good quality for a decent price. Ubiquiti also includes their NVR software free of charge. I, personally, have had great success with the above mentioned software. Some hiccups here and there, but nothing major to write home about. That being said, lately I have had the desire…the want… for something more out of my home camera/NVR system that Ubiquiti does not offer at this time. A great addition to my system would be a couple of PTZs.

For those of you who do not know what a PTZ camera is, it stands for, Pan, Tilt and Zoom. This allows the user to move the camera about instead of having it in a fixed position.

In order to pull this off and add some PTZs to my network of cameras, I had to come up with a different NVR solution. This is where Blue Iris comes into play. I knew I could not replace all of my Ubiquiti cameras and really had no need to. However, I needed a solution that would play nice with them. Something else Ubiquiti is not exactly known for.

I purchased a copy of Blue Iris for $60 and installed it on my home server.

Purchase BlueIris here

Steps to take

I then began to remove my Ubiquiti cameras from the Ubiquiti NVR software by using the “unmange” option. Once all of the cameras were out of the Ubiquiti NVR, I then logged into each camera and set them to “Standalone” mode. This allows them to send an RTSP feed. Blue Iris can then receive the RTSP feed. 

Once you have put the camera into “Standalone” mode, it will reboot.

You can now launch Blue Iris and add the camera to it. You will need your RTSP URL and port number. In this case, it is 192.168.35.101:554

Within the Blue Iris Admin Console, right click anywhere and select “Add new camera” from the popup menu.

A dialogue box will appear. Give your new camera a Full Name and a Short Name.

Under “Type” make sure it is set to “Network IP”

On the “Options” section, I chose to enable all 3. These are optional, you may pick whatever options fit your situation.

When you are satisfied with the settings, click on the “Ok” button. A new dialogue box will appear. Here you will want to leave the first drop down as “http://” and then enter the IP and port number of the camera. So in my case, 192.168.35.101:554. The “Make” will be “Generic” and the model will be “RTSP H.264/H.265/MJPG/MPEG4. Under the “Video” section, set “Path” as “/s0”, Audio Format can be set to “64kbps G.711 u-law”

I left the additional settings alone. Something I am trying to get working in the future is to require a username/password for the RTSP feed. Currently I have left those blank. From my research, Ubiquiti does not seem to support that as an option with Blue Iris at this time. I am ok with this as my cameras are on a separate VLAN on my home network.

Go ahead and click “Ok” – You should now be able to see your Ubiquiti camera within Blue Iris.

 

Now that I have my Ubiquiti cameras working within Blue Iris, I can go ahead and any other type of camera to my system, this includes PTZs.

 


 

Permanent link to this article: https://achubbard.com/2018/01/30/feeding-ubiquiti-cameras-into-blue-iris/

Unifi and NanoStation VLAN Configuration

Unifi and NanoStation VLAN Configuration

Background

This is a tutorial on how to configure a VLAN on a Ubiquiti Unifi Controller and switch. We will also go over how to use the second ethernet port on a Ubiquti NanoStation on a different VLAN for use with a Ubiquiti Security Camera.

I have a rather long driveway, our upper half of the driveway is where my office and house are located. The lower half houses an area for our growing animal population and parking. I have multiple VLANs, 1 of which is for my security cameras. I wanted the 2nd port on the Ubiquiti NanoStation placed on the lower portion of the driveway to be able to utilize my camera VLAN.

This tutorial will assume that all of the hardware is in place and you are ready to make the secondary ethernet port on the NanoStation work on another VLAN.

In my case, I have a Unifi Controller that will need to be configured with my security VLAN, VLAN35, prior to configuring my NanoStations.

Unfi Configuration

Enter the Unifi controller and navigate to Settings >Networks. 

Click on the “Create New Network” button. Select “VLAN Only” from the “Purpose” section. Give your VLAN a name and a number. I chose 35.

You can then configure any other settings for your new VLAN that you may need. In my case, I only needed the basics. No DHCP on my security VLAN. You can then click on the “Save” button.

Once saved, in the Unifi controller, navigate to “Devices”

Select your switch and it will open the device’s configurations on the right hand side of the page. Select your port from the list and click “Edit”

On my “Core” (I use quotations because it is not really a core switch, but it is my main switch) I picked port 2 to use for my NanoStation uplink.

You want to make sure the “Switch Port Profile” is set to “All” – The reason is that this port is going to act as a trunk port and provide all of the VLANs to your first NanoStation. You want this if you wish to pass all of your VLANs over the bridge. Click “Apply”

NanoStation Station 1 Configuration

Next, login to the web interface of your NanoStation that will be acting as the “Station” – Navigate to the “Wireless” tab. Here you want to configure your wireless bridge settings (IE: your SSID, WPA2 Key, Channel Width etc) – I will leave that up to you to determine what works for your application. Since this NanoStation is acting as the “Station” you want to make sure the “Wireless Mode” is set to “Station”

Below is what I chose for my settings:

Once the wireless portion of your first station is configured, go to the “Network” tab. Here you can configure your station with a static IP etc. For the purposes of this tutorial, we will assume you have already given your station a static IP address, gateway, mask, DNS and so forth. You will want to make sure that the “Network Mode” is set to “Bridge” and that the “Configuration Mode” is set to “Simple”

NanoStation Station 2 Configuration

After completing the setup of your first NanoStation, login to the web interface of the second NanoStation. First go to the “Wireless” tab on your second NanoStation. This time you will want “Wireless Mode” to be set as “Access Point” – You will then match the rest of the settings to the settings you configured on the “Wireless” tab on your first NanoStation.

Once you have selected your settings, navigate to the “Network” tab on your second NanoStation. This is where things get to be a little be more complex. Since the wireless bridge itself is passing all of the VLANs across it, we need to tell the NanoStation what VLAN to use for the 2nd onboard ethernet port. This is the port we will be daisy chaining our camera off of.

VLAN and Bridge Configuration

On station number 2, your “Network Mode” will also be set to “Bridge”, you will have the option to set a static IP, mask, gateway and so forth. The real difference here is that the “Configuration Mode” MUST be set to “Advanced” this will open up a slew of different options for you.

When “Advanced” is selected, you will now see a bunch of options at the bottom of the page. For this example, the LAN0 port is feeding a switch, the LAN1 port is what the camera will be daisy chained off of and WLAN0 is the wireless bridge between the two NanoStations.

Under the VLAN Network section, we first must add VLAN35 to each interface. This will allow the NanoStation to pass VLAN 35 over the wireless bridge and the 2 ethernet ports.

After adding the VLAN to the interfaces, come on down to the “Bridge Network” section. If memory serves me correctly, you must break the existing bridge to configure a new bridge.

BRIDGE0 is allowing LAN0 and WLAN0 to communicate thus passing management traffic to the switch connected to that ethernet port.

BRIDGE1 is allowing LAN1 and WLAN0.35 to communicate thus allowing camera traffic to pass from LAN1 to the wireless bridge, and back to the NVR.

After configuring the bridges, you must go up to the “Management Network Settings” section. Select “Management Interface”, in my case, it is “BRIDGE0” or my “management” VLAN.

The final step before you can plug the camera in, is to enable POE Passthrough. This allows the NanoStation to power the camera via POE on the secondary LAN port. On your second NanoStation, navigate to the “Advanced” tab. Scroll down until you find “Advanced Ethernet Settings”. Check the checkbox labeled “POE Passthrough enabled”. Click the change button and you should now be able to power up your camera on a separate VLAN.

 

Hope this helps someone, I spent a lot of time trying to get this to work on my property.

Permanent link to this article: https://achubbard.com/2018/01/30/ubiquiti-unifi-vlan-configuration-and-nanostation-ethernet-port-vlan-configuration/

Dell PowerConnect 5524P Firmware Upgrade

Dell PowerConnect 5524P Firmware Upgrade

Background

Upgrading the firmware on a Dell PowerConnect 5524p switch is a fairly simple task. For this tutorial, we are going to assume that you already have console and web access to the switch.

 

You can download the 5524’s firmware from Dell’s webpage located here: Dell Support

Steps to take

Login to the switch’s web interface.

Navigate to System > File Management > File Download.

In the “Download Protocol” section of the page, select “Download via HTTP” – This is where it is a little confusing because you are actually uploading the firmware to the switch.

Software Image Upload

Within the “Firmware Download” section, you should now see a “Browse” button. You can click this and navigate to the location you have stored your Dell firmware. There are two files to this procedure. The first one is the “Software Image” or the .ros file. Select the .ros file, hit the “Open” button on the dialogue box, then click “Activate” on the browser window.

Once the .ros file has completed it’s upload, you will see the following screen:

Click close and refresh the page. *NOTE* If you try and upload the second file without refreshing the page first, you may see a error stating “Invalid Image” or “Invalid File Type” – I ran into this on 2 separate 5524p switches that I have updated recently.

After refreshing the page, re-navigate to System > File Management > File Download. Re-select “Download via HTTP”

Boot Code Upload

In the “Firmware Download” section, click the drop down for “Destination File Type” and change it to “Boot Code” – This is the .rfb file we will be uploading. Then click on the browse button, navigate to where you have stored your Dell firmware files and select the .rfb file. Click “Open” on the dialogue box, then click “Activate” on the browser window.

You will see a box that says “Copy Finished” – Click Close

Navigate to System > File Management > Active Images. Here we will select which image to use after a reboot. This will display the current image being used by the system. Under the “After Reset” drop down, select the image which you just uploaded. Click on the “Apply” button.

Once you click “Apply” a green box will appear that says “Success” 

If you are in the console of the switch that you can issue the “Reload” command to reboot the switch.

Upon reboot, you can issue the command “show version” and see that the switch is using the new firmware version.

I hope this helped you out, thank you for reading my first blog post! Check out my links page for some awesome resources

Permanent link to this article: https://achubbard.com/2018/01/29/dell-powerconnect-5524p-firmware-upgrade/