Easy Plugin for AdSense by Unreal
 

Remove Passwords or Other Text from VSTS Git

Saturday, 18. November 2017

In a perfect world no one would ever store usernames and passwords in code.  We are on in a perfect world and I myself make mistakes and in the past I have created scripts that required passwords in them and I accidentally pushed the code to VSTS with the password entered.  So I had to figure out how to remove that from the history of the file.  I could have deleted the project and created a new one but I would have lost all my history of commits which I did not want to do.  Here is how I found to remove text from commit history.

Read more

Enable Secure PowerShell Remoting

Monday, 6. November 2017

Working with a lot of VMs in Azure it has be come more essential to be able to run my scripts on many VMs at a time.  The first step in doing this is to enable remote PowerShell and keep it secure.  Below is the script that I use to enable remote PowerShell and generate a cert to use for encrypting the communication.

Read more

Visual Studio Code with Visual Studio Team Services (VSTS)

Sunday, 5. November 2017

I have been doing a ton of PowerShell scripts lately and I was wanting to find a way to tie into a version control system.  Originally I wanted to do something like GitHub but since I want to do a free option GitHub was out as everything is public on their free option.  So I looked at Visual Studio Team Services (VSTS).  They offer 5 users for free and the repositories can be setup as either git or TFS.  So VSTS was it.

My next challenge was PowerShell ISE.  I was wanting to interrelate VSTS into ISE but I did not find a solution that I liked but I did stuble across Visual Studio Code.  VS Code is pretty neat.  It has a ton of addons and can support many languages including PowerShell.  Also there is an addon for VSTS which is nice.

Read more

Snort Inline on CentOS

Monday, 3. August 2015

I have been wanting to setup Snort on a CentOS based firewall for a while and I finally got around to it.  The good thing is I finally got it working thanks to a blog Dennis Panagiotopoulos here, I have confirmed this works for CentOS 6.6 and 7.1.  The problem is as with getting Snort to run inline.  I was unable to find any thing on getting this to work correctly.  So here is what I had to do in addition to Dennis’s blog post:

Read more

Hyper-V on Windows 8 – Wireless Network Does Not Work

Thursday, 7. March 2013

I recently upgraded one of my laptops to Windows 8 and I noticed that it could run Hyper-V, so I enabled the Hyper-V feature and everything went smooth until I setup the Virtual Switch.  I set it up to use my wireless NIC and I left the check mark for “Allow management operating system to share this network adapter”.  Once it was done setting up the Network Bridge and the vEthernet interface I could no longer access the network.   Read more

Forefront Protection 2010 for Exchange Blocking winmail.dat

Thursday, 19. July 2012

When deploying Forefront Protection 2010 for Exchange and enabling file filter the majority if not all emails being sent and received had the body of the message replaced with:

FILE QUARANTINED

Microsoft Forefront Protection for Exchange Server removed a file since it was found to match a filter.
File name: “winmail.dat”
Filter name: “FILE FILTER= Blocked File Extensions: *” Read more

Create a CA

Saturday, 8. January 2011

I was tired of having all these invalid or untrusted certs on my network applications and devices so I decided to load up a CentOS box with OpenSSL and make my own Certificate Authority (CA).  See the steps after the jump. Read more

SQL 2008 R2 on Windows 7

Wednesday, 5. January 2011

I wanted to write a quick post about an issue that I ran into but could not find much information on.  When running SQL 2008 R2 Management Studio on Windows 7 x64 ( I have not tried on 32 bit) there are a couple of catches.

  • First one I ran into is the user must run the Management Studio as an administrator if they are in an active directory group that has been given access to a database because if Management Studio is not run as administrator then for some reason the users group information is not passed to the SQL server.
  • Second is when connecting to a SQL 2005 server the user is not able to update or delete tables in a database.  Creating a new table was not an issue it was just when modifying, updating or deleting an entry in a table or the entire table its self.  The user was set to owner of the database and was not apart of any group.

The first issue is a pretty easy fix but I have not found a fix for the 2nd issue.

Site Update

Thursday, 16. December 2010

I have finally decided to update WordPress for this site on my server and get everything going again.  Of course the template I was using doesn’t work on the new version of WordPress so I have spent the past couple of days looking at different templates but I have been having a hard time finding a good one.  I landed on this one because it is simple and it has what I need.  Let me know what you think of the new layout.

Thanks,
Brian

OpenFiler as Fiber Channel Target

Monday, 24. May 2010

I wanted to post my findings on how to use OpenFiler as a Fiber Channel SAN.  This process isn’t documented as well as I hoped it would have been but the forums on OpenFiler helped a lot but still were lacking.  This post will go from blank box to Fiber Channel LUN being presented by OpenFiler.  My goal was for a faster SAN as I was using iSCSI but it just didn’t meet my expectations.  For the SAN I am using a Qlogic QLA-2342 fiber card and a Brocade Silkworm 3200 fiber switch.

  1. Download the latest version of OpenFiler.  In this example I used 2.3.
  2. Install OpenFiler with out the fiber channel card installed.
  3. Once installed update OpenFiler using conary updateall.
  4. Reboot once the updates have completed and make sure everything is working ok.
  5. Shutdown the machine and install the fiber card.
  6. Get the WWN of the fiber card port(s) by showing the content of /sys/class/fc_host/hostX/port_name
    cat /sys/class/fc_host/hostX/port_name
    NOTE: X in hostX is the number of the adapter.  If there is more than one port check all WWNs.
  7. Edit /etc/init.d/scst and change the chkconfig to # chkconfig: –  99 36
  8. Have the scst server run on startup with chkconfig scst on
  9. Start the scst service.  service scst start
  10. Write the blank config to file with scstadmin –writeconfig /etc/scst.conf
  11. Create a logical volume for the LUN.
    1. This example we added a drive just for data /dev/sdb this will make prepare the drive to hold logical volumes for LUNs.  First get the geometry for the disk
      parted /dev/sdb print
    2. Label the partition
      parted /dev/sdb mklabel msdos
    3. Create the partition, 0.000 is the beginning and 1907328.000 is the end of the geometry from step 1
      parted /dev/sdb mkpart primary 0.000 1907328.000
    4. Enable lvm
      parted /dev/sdb set 1 lvm on
    5. Create the physical disk
      pvcreate /dev/sdb1
    6. Create the group, luns is the example name of the group
      vgcreate luns /dev/sdb1
    7. Create the logical volume, 50G is the size in GB, lun1 is the name of the logical volume and luns is the group
      lvcreate –L 50G –n lun1 luns
  12. Edit /etc/scst.conf.  vim /etc/scst.conf
    1. Under [TARGETS disable] move the HOST entries under [TARGETS enable].  NOTE: The HOST entry WWN should match the WWN(s) from step 6.
    2. Under  [HANDLER vdisk] add the logical volume created in step 11.
      DEVICE lun1,/dev/luns/lun1,WRITE_THROUGH,512
    3. Under [GROUP Default] add the USER WWN.  This is the server you want to be able to access the LUN.
      USER 21:00:00:1b:32:17:87:7e
    4. Under [ASSIGNMENT Default] add DEVICE then the device created in step 12.2 then the LUN number for the device.
      DEVICE lun1,0
  13. Edit modprobe.conf vim /etc/modprobe.conf and change qla2xxx to qla2x00tgt
  14. Reboot the OpenFiler machine and when it starts the LUN should be presented to the server.