Quick tip for internet facing ESXi servers

Posted on 20 May 2015.

Quick tip for all you with internet facing VMWare ESXi Hosts. I have just got my hands on a box on the Hetzner network (more on that later) and using their LARA system i installed ESXi on it. All was good, then i tried loggin in a couple hours later and i kept getting errors about my password being wrong… So, i tried a few more times, got pissed off and rebooted the box (had to do a hard reboot, since i couldent even get in over KVM). I though this was a hardware issue, or a config issue, and left it… yesterday, i had the console open most of the day, and when looking at somthing i noticed this:

Well, thats why i couldent login! So, tip: create a second user account, name it something other than root, give it a secure password and use that to login to your ESXi box. Ideally, your ESXi box should be behind a firewall, but in the case of a dedicated server, that may not be financially feisable… Hope this helps someone!

VLANs, Wifi and Mikrotik

Posted on 10 May 2015.

About a month ago, while i was recovering from surgery, i attended a Webinar on Cisco Meraki devices. After the webinar, i was contacted by Maraki and given a MR18 with a 3 year license, to play with and evaluate. So, i set it up in the house and all was good.

Thing is, the wifi in the house was grand previously. I have a Routerboard RB951G which does the job and has no issues. And because i am mostly offsite in the office i work, and because i need to remotely manage the network, the MR18 is going into the office from tomorrow morning. I may talk about the MR18 and the rest of the Maraki gear later on, but this is not that post. This post is about something the MR18 did, and i wanted to do on the RB951.

So, the MR18 allows you to create mutliple Wifi SSIDs, each with different encryption and security and can use different VLANs. Now, the Mikrotik does the same, but the VLANs stuff is not that easy to figure out. but essentially, what i needed to do was as follows:

create your new wifi SSIDs:

/interface wireless
add master-interface=wlan1 name=wlan1.10 ssid=vlan10
add master-interface=wlan1 name=wlan1.20 ssid=vlan20

next, create your vlans. these need to be connected back to your main ethernet connection. In the case of my RB951, there are 5 ethernet ports. 1 is the gateway back to my Cisco switch and on to my PFSense router. 2-5 are all slaves of number 1, which is a master. So, 1 is essentially a trunk network. So, vlans are created on that.

/interface vlan
add name=vlan10 interface ether1-gateway name=ether1.10
add name=vlan20 interface ether1-gateway name=ether1.20

next, a bridge to connect them

/interface bridge
add name=vlan10
add name=vlan20

and connect them to the bridge

/interface bridge port
add bridge=vlan10 interface ether1.10
add bridge=vlan10 interface wlan1.10
add bridge=vlan20 interface ether1.20
add bridge=vlan20 interface wlan1.20

And thats all i needed to do. I have a Sophos UTM Home edition running on a vm for testing, which vlan10 is connected to. It has an upstream connection back to the PFSense box, which has it firewalled off and allows it outside the network, not nothing else. I am planning on doing this with other firewalls, just to do some testing with. This allows me to connect my phone or laptop, or any other wifi device, to a given wifi connection and then be on my way. I also have an older Dell PowerConnect switch, which, if i ever get around to it, will have multiple connections back to the Cisco and then allow physical devices to connect to different vlans.

Any questions, comments, etc, leave a comment blow.

Using git and Route53 together

Posted on 07 May 2015.

so, earlier on today, i was talking about using Git with a DNS service called LuaDNS to update your DNS records. Well, thing is, i have 30+ domains registed, and of them about 25 are hosted on Amazon’s Route53. So, moving ALL of them seems, well at the moment, exsisive… So, i went digging…

there is a tool called cli53 which will allow you to manage route53 objects from the command line. It can aslo export your zones to BIND format and then re-import them if you have made changes… This all came out of a blog post by the guys and gals at netguru who showed how they integrate their DNS records with their Continous Integration… Now, i have not gotten to that stage, just yet, but its only 1 step more down the road… but i dont have my zones in bind format… So, how do i do that?

I tweaked their block of ruby code (first time playing with ruby, be gentel with me) and got the following:

essentially, it runs cli53 (you may need to change your path) and then creates .bind files for each zone.

then, using their code below, you can re-import them to Route53:

i have exported all mine, added them to git and done some testing… All seems to be in order… once i do some tweaks, i can get that CI piece working and it should be all magic…

Git Push DNS

Posted on 07 May 2015.

There are now a lot of services that have “git push” options availabe… you can build websites with Azure and Github, books using ShareLaTeX and now, DNS using LuaDNS. I have one zone running at the moment (tiernanotoole.net) and you can see the DNS records on github here. I am tempted at moving other records over soon… but i am currently on Amazon Route53 and 1: its works, so dont break it, and 2, not sure how to bulk export records from Route53 to Bind or Lua format.

[update] 2 quick updates: 1) their free account, which is what i am using, allows 3 domains and 30 host records. they also charge less than Route53:

  • route 53 for 10 domains per year cost 50c per domain (first 25) per month, then query charges. total, about $60 + queries (@40c per million).
  • luadns cost $29 a year for 10 domains, 5million (ish) querys a month and 500 host records…

I think i have nearly 30 domain on AWS… so, their $59 a year package, which include 30 domains, would probably save me money…

and 2) i forgot about one of those git push services… DeveloperMail is a service, for developers, for managing email servers. IMAP, SMTP, Git… all supported! just signed up… $2 a month per user. Lets see how this works…

Bulk compressing images for the Web

Posted on 29 April 2015.

Now that all my sites are running Jekyll I am trying to get them optimized for SPEED which meant looking at all the stuff that takes time to download… There are more tweaks (and possibly posts) coming down the road, but to start, i needed to look at images.

First things first. Im running this on a Sabayon Linux box, so some of the install commands will be different… (Also, i do need to explain why i moved from Windows to Linux on the GodboxV2, but thats a different post…)

First, install OptiPNG (they have a Windows build too…) and JPEGOptim

sudo equo install optipng
sudo equo install jpegoptim

next, using the Linux find command (this should work also on OSX…) run OptiPNG and JPEGOptim on all pngs and jpgs in your given directory:

find . -iname "*.png" -exec optipng {} \;
find . -iname "*.jpe?g" -exec jpegoptim {} \;

depending on how many images (and how fast your machine is) it should take a min or two…

Thats it! I did a git status, which showed me all the changed images, and then deployed the Jekyll sites… All good! Thats it!

About

Geek, From Dublin, Ireland. What more can i say?

Contact Details

Tiernan OToole
Twitter: @tiernano
Irish Ph: +353-1-555-1245
UK Ph: +44-845-869-2488
US Ph/SMS: +1-404-806-9387
Skype: tiernanotoole
tiernanotoole.ie
geekphotographer.com
blog.lotas-smartman.net