Current Server Setup

The server has changed in many ways since its first build with an old 775 socket celeron and 2gb of ram, to a dual xeon 771 setup, to a dual 6 coreopteron with 32gb of ram, back to a xeon 771 with 32gb of ram, and now its an i3-2120 i5-2400 with 16gb of ddr3 ram.

The server is running server 2012 r2 Datacenter with hyper-v for the virtual machines. here is a quick rundown of the virtual machines.

For main storage there is an array of 5x 2TB hitachi drives in Raid 5. contacam has its own 1tb blue, lancache has its own 300GB 10k velociraptor, there is a 500GB seagate i keep images of most of the vm’s on. finally the operating system with the rest of the vm disks are on a samsung 250GB samsung SSD.

Contacam: Running windows 10 ltsb and contacam software to manage my home security cameras. [4 cores 1GB-4GB dynamic meory]

Docker host debian: running docker + cockpit for docker management. Below is a list of currently running dockers. [4 cores 4GB static memory]

  • Keepass: to hold my passwords for everything im getting old and have a hard time remembering everything
  • Plex Server: basically only use this to stream music to work, and to give my dad access to my movie / tv show libraries at his house.
  • Teamspeak 3 server: i was running a vm just for this moving it to a docker was kind of a learning experience but it works great even was able to transfer all my stuff from my windows install into it with a little tweaking. That server had been running since 2013 so i have alot of config into it didnt wanna lose that.
  • ubooquity: I recently tookup an interest in reading comics this utility is nice for both remote and local viewing of comics, really cool to browse it on the tv using fire tv 
  • Jackett: gives extra indexers for radarr, sonarr, and lidarr on my download server.. i ran it in there but jackett and windows didnt seem to get along well at all and constantly crashed.

Download Server: Running utorrent pro, radarr, sonarr, and lidarr to manage my movie, music, and tv show libraries does its job.. most of the time lol. [4 cores 1GB-4GBdynamic memory]

Lamp Stack: Running Turnkey’s Lamp stack iso, most amazing people saves so much repetitive work. runs my word press site, my invoicing software (simple invoices), and a few misc web utilities. [2 cores 768MB ram]

lancache: Running NGINX in CENTOS 7 based off of multiplays lancache it caches steam and origin downloads so when its accessed a second time (i have two gaming pc’s) the second download is as fast as it can push over gigabit (or read from disk in my case hope to get this on an SSD eventually). [4 cores 1GB-2GB dynamic memory]

Pi-hole: Running Debian and pi-hole dns server this gives network wide ad blocking, works like a charm. I did try this in a docker and it seemed unstable so i reverted back to its own vm. [512MB ram 1 core]

pfsense + pi-hole + dns resolver (unbound) working with dns redirects.

Recently i switched my home network ad blocking software from dnsbl(pfblockerng) to pi-hole because the gui is so much nicer and easier to work with and see what all is going on. so when i changed my dns server in pfsense over to the new pi-hole server it basically bypassed all my dns redirects i had setup in unbound (dns resolver), so after some searching i found an option in unbound services>dns resolver “DNS query forwarding, check the box “enable forwarding mode” and that will make unbound the primary dns which retrieves its resolutions from pi-hole.

The downside to this setup is pi-hole shows all requests from 192.168.10.1 (aka my router) instead of the individual devices, but it was the only way to make it work with my lancache server which relies on the redirects from unbound.

hopefully i can tinker with it and find a workaround for that later but for now it works. Thanks for reading!

!

How to hook up your own wifi garage door opener.

I was looking at garage door openers for my new pole barn and kept seeing they wanted like $100 for the wifi modules for all these units…. now im sure they all are a little smarter and more sophisticated like logging door openings and giving and open or close status.. if you want all that probably best off buying one of their units, if you just wanna be able to open it from anywhere or without a garage clicker in your car or with alexa or google, this will get er done.

my garage door has one of the new fangled opener buttons that has like 3 buttons “learn, light, open” so it’s not just shorting the two wires out like some of the older ones.. if you have one of the older ones you can just put this in parallel to your current button and it will function without any soldering.

firstly here is a list of items needed to complete the project.

  • soldering iron and solder
  • small 20-24 gauge wire
  • phillips head screwdriver
  • momentary wifi switch module this is what i bought.
  • multimeter
  • 12v power supply
  • project box that will fit the wifi module

to start first take your button off the wall and remove the wires from the back by loosening the two screws holding them to the pcb, and go ahead and take those screws the rest of the way out, on mine they were the only thing holding the pcb in besides friction, so now we just need to pop the pcb out of the plastic housing gently.

once the pcb is out of the housing go ahead and look for the button that is pressed when you hit the “open button” usually its gonna be an smb mounted tactile switch, now you are going to want to use a multimeter and see which terminals are normally open and normally closed  you’re gonna want to go with two of them that are normally open with infinite resistance, after the pair you want to use have been identified you need to solder the 24g leads to the board, the other end of the leads will go into the NO and COM terminals on the wifi switch (normally open and common).

after that is hooked up and the wire is ran to your terminals on the wifi switch, were gonna hook up our 12v power to the wifi switch, simply put positive with positive and negative with negative, if your leads on the 12v psu aren’t clearly enough marked you can use the multimeter to check, put it on DC voltage setting and touch the two 12v leads while its powered on, if it has a -12.0

instead of 12.0 you switch the leads around and check, what ever the red multimeter lead is on is positive and black is negative when you get a positive reading.

finally connect your wifi module to the EWELINKS app, register your account, then hold the button on the wifi switch for 5 seconds it will change its flashing of the led and you are ready to connect it, once its connected press the button on your phone and bam! should be working! now that its verified its working go ahead and put the wifi switch into the project box and route your wires however you want just make sure you get them back in the right hole.

point to point network bridge between two houses without sharing internet connections

My cousin and i have talked about it for a few years connecting our two networks so we could share information back and forth mostly movies and tv shows, while at the same time not sharing an internet connection. we finally stepped up and decided to do it and here is how.

required supplies:

  • direct bury rated or UV resistant cat5e or cat6 depending if you have to bury it or if it will be exposed to sunlight.
  • two point to point network bridges rated for the distance you need to  travel or more if you want better reception. here’s what we used be sure they support WDS bridge mode
  • trenching tool if there is no LOS from building to building, i just used a manual edger  and just wiggled it back and forth to open the crack up.
  • patch cables to plug your bridge into your pc for initial setup
  • better than average router for my example i will be using a pfsense machine with a quad port gigabit adapter your run of the mill netgear won’t get the job done.
  • a little bit of networking and internet knowledge goes a long way.

first thing to do is get your  cat5e or cat6 line ran, weather you are going to be installing it on your roof or on a pole out in the yard.

after you have your line ran to where you need it go ahead and get your antenna mounted using the supplied screws and or fasteners, be sure if doing a line of sight installation that the antennas will have enough rotation to be able to align.

once mounted and you have your cat5e hooked into the lan port hook the other end of the cat5e into the POE injector where its labeled POE , then use your patch cable to go from the poe injector to your computer, and power up the antenna by plugging the PE injector into the wall.

follow the instructions on your antennae guide about how to set them up usually it involves logging into a web gui and changing settings there. When doing this you DO NOT want to use one as an access point that will cause a bunch of headache… trust me we went through that.
set both devices as a WDS bridge and you will need the MAC address off of each device, put ones mac in the other and vice versa, they each need to have each others mac plus the AES encryption password the same on each antenna.

If you attempt to use one as a bridge and one as a wifi access point it causes a ton of issues later on, this way using WDS makes the connection transparent as though you took an ethernet cable and plugged them directly into each other. another thing to do would be to go into the ip settings and assign them an ip address inside your transit network so you dont lose them in later steps.

ok, now that we have the antennas put up, powered up and linked together lets move on to the routers.  you are going to need 3 ports, one LAN one WAN and one for the transit network. you will want both of your networks on a different subnet but same subnetmask. example mine is 192.168.10.0/24 cousins is 192.168.50.0/24

i will explain how ours is setup but wont go into great detail on how to do it its pretty self explanatory, if you have much experience in pfsense. the WAN and LAN will auto configure when you install pfsense then to add the transit network you go to INTERFACES> (ASSIGN) assign your available nic as an interface, then go back to interfaces at the top and select that new interface usually opt1 by default.  set ipv4 configuration type to static ipv4, then under ipv4 address give your opt1 an ip address for mine i did 192.168.30.1/24 and on my cousins opt1 we assigned it 192.168.30.2/24.

in order to get our networks to talk to eachother you need to

at this point this was our setup

me
lan 192.168.10.1/24
opt1 192.168.30.1 “transit network”
static route 192.168.50.1/24 -> 192.168.30.2

him
lan 192.168.50.1/24
opt2 192.168.30.2 “transit network”
static route 192.168.10.1/24 -> 192.168.30.1

After getting those setup you will want to go to firewall>rules and add a rule in the opt1 tab to allow any traffic to opt1 from any source or any destination and any protocol you will also want to go to the LAN tab and set a rule to allow all from opt1 net.

after that is saved, and done on both ends you should be able to connect the antennas up to the opt1 on each side and have a successful connection!

Macbook Pro a1502 touchpad and keyboard not working

i got a request to repair a macbook pro model a1502 the keyboard and trackpad stopped working on. i did some testing hoping it was the “press this key 5 times to enable keyboard” kind of issue… it wasnt but i did notice the keyboard would wake it up from a deep sleep, so i thought maybe it was a software issue, cleared the pram and did a reset, nothing. i then also noticed the key combo for a forced restart worked… i had read about the ribbon cable connecting the trackpad and keyboard to the motherboard goes bad on these often, but i assumed if that was the issue key combos and stuff wouldnt be working!? next step a factory reset after i backed it up. nothing.

i finally decided after all this troubleshooting to lookup the ribbon cable and see how much it was $10 prime on amazon, ok i will give it a try. sure enough that fixed it.

if you have this issue and decide to replace the ribbon be sure to have a P5 bit and a T5 bit to get the case open, the bottom cover uses the P5 and the cover over one end of the ribbon cable uses the T5. i just grabbed a kobalt electronics driver set at lowes and it had everything in it to get the job done, even prying tools that are handy for popping the ribbon cable out and lifting the lever to slide the other side out. thanks for reading and good luck!

moving a centos virtual machine in hyper-v and fixing network issues afterwards

i have been testing an NGINX cache i have setup for caching steam games and i have been testing download speeds having the cache on different types of disks so i could find what has the best performance, but every time ive moved it my network config gets messed up in centos 7.  ive had to figure out how to fix it 3 times now because i forgot how i did it, now i dont have the normal network configuration i have the network configuration tool disabled and manually set the nic settings in /etc/sysconfig/network-scripts/. when you delete the virtual machine and re-create it on another disk using the old disk image the new vm will generate a new MAC address for said machine which throws the manual config off because its looking for another networking device. heres the steps to fix this.

First open /etc/sysconfig/network-scripts/ in your favorite editor and look at the mac address. this will be usually in a vm “ifcfg-eth0” or whatever your adapter name is. simply open that file and look under “HWADDR=xx:xx:xx:xx:xx:xx:xx” that is the mac address your machine is going to be looking for to reconnect the nic.

now that we have the hardware address (MAC address) that we are looking for lets go into hyper-v settings for that VM and look at the options we have. first shut down the virtual machine, then right click the VM in hyper-v manager and click “settings” in the left panel click the  “+” sign next to “network adapter” go down to “advanced features” and in the right column you will see the “advanced features” options where it says “MAC address” change it from dynamic to static and check the box next to “enable MAC address spoofing”
then type the HWADDR under static.

Once you get that typed in there go ahead and click apply then power the virtual machine back up, it should fix the network configuration settings and it should boot normally with a working network config. To verify the network config is working correctly type in

sudo systemctl status network.service

if it succeeds and all is green you are ready to go, if not you might have something else wrong.

thanks for reading!

getting pi-hole to recognize individual clients behind a pfsense router

So, I installed pi-hole on a virtual machine at work, it worked great and a much better gui than pfblockerng/dnsbl but when I was looking at the list of clients the only thing showing was 192.168.0.1 which is my pfsense router,  that is strange right? well the reason that is happening is because I just added the IP for pi-hole under system > general settings > DNS server settings which worked but the problem is the DHCP server was still telling the clients to look at pfsense’s DNS resolver instead of pi-hole so all the requests were going through DNS resolver thus showing only one client in pi-hole since all the requests were coming from it.

what fixed the issue was going to system > DHCP server scroll down to “server list” and add the IP address of pi-hole and your secondary (probably your pfsense address so the requests go to DNS resolver) DNS servers and hit apply and that will make all clients show up in pi-hole’s client list.

one last thing to note, this process will make all machines on the network bypass your DNS resolver so any custom URL redirects on there will not work anymore maybe I will work on a way around that in the future, but for now you might be better off using pfblockerng/dnsbl inside pfsense unless you know a workaround if you do please share! thanks for reading and I hope this helped.

EDIT: i found a way to redirect dns requests via pi-hole here https://github.com/pi-hole/pi-hole/wiki/FAQs#can-i-redirect-a-domain-to-a-different-domain-333

speed issue with private internet access in a hyper-v virtual machine

i was having an issue with stuff loading crazy slow in a hyper-v virtual machine after many searches online with people with the same issues and never an issue i kept looking and eventually i stumbled on this, its for “some versions of windows” which happens to fix the issues in a hyper-v vm. atleast it seems to be the case so far immediately after doing the driver install my speeds in utorrent were great and i could still access the internet where as if i had one torrent running it wouldnt even resolve a web address. hope this helps.

here’s the directions with source linked below, i will also mirror their download here incase their link is broken in the future.

Continue reading “speed issue with private internet access in a hyper-v virtual machine”

Raid 5 expansion conundrum

On tuesday evening at about 6:45pm i started on the seemingly annual raid expansion, whenever i start to run out of data storage on my server i simply buy another 2tb hitahchi drive off of ebay throw it in and expand the array it works great everytime so far.
disclaimer: always do a backup before attempting any kind of storage changes you never know what may or maynot happen

lets jump back about 8 months ago i decided to take my 9650se-8lpml raid controller and swap it for the 9650se-12ml only difference being one supports 8 drives and one supports 12 drives so all i had to do was swap the controllers and plug my 4x 2tb hitachi drives into the new controller everything was recognized correctly i ran through the settings and made sure everything was good. Continue reading “Raid 5 expansion conundrum”