Posted by Brian @ 10:29 am on February 12th 2017

[SOLVED] fail2ban isn’t banning sasl attacks

This morning I noticed a SASL attack in my mail logs, and fail2ban wasn’t stopping. I tested the regex and it was working fine, but… no ban. So here’s what worked for me: changing the backend for fail2ban to polling from auto. Problem solved.

in /etc/fail2ban/jail.local replace
backend = auto
backend = polling

Posted by Brian @ 7:53 pm on October 29th 2014

Superchargers are awesome

Just had to say that. 🙂


Posted by Brian @ 7:35 am on June 13th 2014

No sipping allowed?

20140613-082301.jpgIt appears that the slow food movement has yet to reach Yogyakarta.

Posted by Brian @ 8:30 am on September 28th 2013

A visit to the mines of Moria


Ok not exactly. But I just visited the old
Roman cistern in Istanbul and wonder is this was the inspiration. It was beautiful and eerie. I kept an eye out for Orcs just to be sure. What would have (maybe) been cooler would have been how they used to do it – by boat!

Posted by Brian @ 11:20 pm on December 21st 2012

How to generate an SSL cert for Stunnel4

openssl req -new -x509 -days 365 -nodes -out stunnel.pem -keyout stunnel.pem

Copy the file to /etc/ssl/certs

Add or uncomment the following line in /etc/stunnel/stunnel4.conf:
cert = /etc/ssl/certs/stunnel.pem

Posted by Brian @ 9:06 pm on July 21st 2012

The Tesla Model S will disrupt like the iPhone (thoughts on my Model S test drive experience)

Once in a while a disruptive technology comes along that changes the way I look at something. The ATM. The Walkman. The Internet. The PlayStation. The Wii. The iPod and the iPhone. And now that I’ve driven one, the Tesla Model S. I’ll never look at a car the same way again. Ever.

I’ve test-driven driven two other production electric cars – the ill-fated GM EV-1 and the Leaf. And while I love my biodiesel-powered Mercedes, I made a promise that as soon as the right electric car hit the market I’d buy one. When I test drove the Nissan Leaf a few months ago, I tried to like it, it just didn’t have the performance I wanted. It’s a great car for a sedate, mellow Prius-like driver. That’s not me. It really bothered me that all the torque inherent in an electric car was software-limited. Let me decide when I need power. Don’t make the decision for me, Nissan. The Volt is a gas hybrid so I never even looked at it. I looked at the Panamera but it’s also gas so I’m not interested, and Porsche is terrified apparently to bring a diesel to market in the U.S. So that’s out. BMW? They run ads for a vaporware electric car that looks amazing. Who knows when it will be available? The Tesla Model S is real and delivering today (well, if you signed up a couple of years ago).

I’ve followed revolutionary electric car company Tesla’s story from the early days. The Roadster is beautiful and would have been perfect for me ten or fifteen years ago. But I kept a close eye on the Model S. So when Tesla opened up a permanent showroom in Portland yesterday, I felt the timing was right. I signed up for a test drive last week and didn’t hear back. I had a feeling they were getting a ton of inquries, so today I headed over to the showroom.

And I hit the jackpot.

I was excited to see the Tesla showroom and it didn’t disappoint. It was packed, as in Apple store packed. Great energy in the place. The Tesla people struck me as authentic, passionate and caring – the polar opposite of the typical car saleswoman experience I had at Nissan. All I really cared about was the car, and they had two on display plus an exposed aluminum chassis along with tires, battery, brakes, motors and the like.

Visually, the Tesla S is beautiful inside and out. I don’t know about you, but I grew up on a diet of late 20th century sci-fi where everyone drove kick-ass looking electric cars. It feels like I’ve been waiting my entire life for one to show up, and it finally has. The Tesla S is the first 21st century car I’ve seen. From the way the recessed door handles pop out to the massive touchscreen, Tesla has put a massive amount of thought and effort into what a car can be from the ground up with no assumptions, except the ones you want, like a steering wheel, an accelerator on the right, a brake on the left.

Tesla Model S

The level of passion from everyone – literally everyone – on the Tesla team that I interacted with (about eight or ten in total) tells me that they really have something here. You can’t fake that passion, and you can’t buy it. It’s real. And they have the passion not simply because they’ve all driven a Tesla S, but because they believe in the company.

I’m sure people can and will find faults with bits here and there. I didn’t see a cup holder. The center console is 100% screen and nothing else; there’s no place to stick anything. Someone said the back seat headroom was a little low. There’s probably more little things.

The software engineer in me is excited about the SDK they’re going to release. I know the OS is built on top of Linux, so that makes me happy. I hope they’ll expose enough of the car to allow people like me to write interesting interfaces and do more with the car. I can already think of some amazing apps.

The doors have a nice way of popping open and a solid fit. I found the interior to be high design, free from clutter, and immediately intuitive. The seat felt great, had an obvious method for adjustments, and lays entirely flat if you need it.

The touchscreen is amazing; it incorporates a web browser, bluetooth, a music library with two USB ports you can plug in to, and a wealth of logical controls for a wonderful array of sensible items. Things like, do you want the car to lock itself after you start driving? Click. You’re done. Anyone who has ever mucked with an OBD II connector and a laptop trying to flip bits on car firmware knows what a hassle it is to tweak these things, if you can do it at all. But now, finally, it’s at the touch of a finger. There was lots more – a sweet UI for adjusting where the sound locates, a high res visual display of open doors, touch to adjust suspension height (yes, really), swipe your finger to open the sunroof and tap to stop it… lots more. Two of the guys I talked to were fired up about different software tweaks and updates they have planned. I’ve heard that story a million times, but if they can follow up on it, it will be amazing.

Sitting in the car, putting my hands on it – it was all I needed. So I put down 5k for a reservation. I’m #10,631 on the list. Their website doesn’t allow you to do a PayPal echeck as we discovered, so I covered the deposit another way. As a result of the delay, they put me into a test drive to compensate me for the trouble of PayPal not working, which was really unexpected and extremely nice of them (thank you Maria!). So an hour later I found myself climbing into a Tesla Model S for a real test drive, something I thought I’d have to wait months for. Sweet!

The door handles lie flat on the car – if you push on them they pop out and then behave like an ordinary door handle. The keyfob automatically unlocks when you’re close. Inside, the massive sunroof was open. You push in the shifter, put your foot on the brake and the car is ready to drive. No key. No start button.

So I glided away in nearly complete silence. You can hear a little wind and the rolling of the tires. That’s it. When you lift off the accelerator the car slows down rapidly and pulls some of that energy back in the batteries. It took a few moments to get used to how quickly the car slows when you lift. It turns out you can adjust that on the touchscreen if you want less energy recovery. I did it half with and half without on the test drive, and discovered that I liked the way slowing with power recovery felt.

The dashboard has a sweet user interface that displays power drain or recovery as green or orange lines that parallel the curve of the high resolution analog-looking speedometer. The driver’s display has a sort of mini display of the big 17″ center console with a few bits of information including iPod-like album art of whatever you’re listening to. I wasn’t able to fully demo the sound system while driving as I honestly didn’t care at the time, but I heard it in the showroom and the stock system sounded pretty good.

So I took it quite easy all the way up to the freeway entrance, and I found the car to be easy to drive, smooth, quiet and just delightful to drive at low to average street speeds. Near the freeway onramp the Tesla guy advised me to try and get some clear room so I could get the full zero-to-sixty acceleration, and fortunately we were first at the light so I was able to accelerate to freeway speed from zero and… well… no wait. Before I describe the feeling let me just put it in perspective. I’ve driven 500hp racecars on a real racetrack, Ninja motorcycles, 160hp karts, and my trusted BMW M3 at absurdly high rates of speed. Driving fast is not new to me.

Having said that, I have never, and I mean never, felt acceleration like that. The Model S goes zero to sixty in 4.4 seconds. It felt like less. There’s no shifting. No delay. You just get instantaneous and mind-blowing acceleration. It’s the kind of rush you get when you ride a roller coaster. It’s addicting. The thing literally rides like it is on rails. It’s like this liquid feeling you get of pure bliss. Part of it comes from the extremely low center of gravity this car has because of the smart way Tesla put the batteries on the floor of the car. Part of it comes from the 21 inch tires. The end result is magic.

The rest of the test drive I spent creating space in front of me to feel that acceleration rush, accelerating from stops, taking corners hard, and having, no kidding, the driving time of my life. The Tesla guys were genius on the route they chose – I drove the freeway twice, took chicane-like S curves, straightaways, downhill runs, and got a really nice feel for the car. I felt the traction control bite where I could have gotten in deep trouble, though it cut in a little early and hard in my opinion – not quite as tight as on my M3. I felt strong and responsive brakes that kept up with the car, entirely unlike that Saleen Mustang I rented in the 90s that nearly killed me with absurdly underpowered brakes and a high center of gravity.

I didn’t want to surrender the car when I got back, and the smile on my face is still there hours later. I am so glad I reserved one of these things, because they are going to sell like crazy. The hardest part for me now is having to wait for a year until I can get one. For once, something exceeds the hype.

Thank you, Tesla.

P.S. I am in no way affiliated with Tesla, I don’t own Tesla stock (at least at the time of writing this), nor have I been compensated to write this in any way.

Tesla Model S

Posted by Brian @ 1:16 pm on July 7th 2012

Fix SMTP outbound mail failing with SugarCRM 6.5

I know that sending mail from PHP was working for a particular server, because another PHP application was using the same thing. Turns out that the wizard is broken; if you skip the wizard settings and then go into the admin section and change the settings there with the proper email settings for your SMTP server it works. Here’s the offending error in sugarcrm.log:
[FATAL] SMTP -> ERROR:Password not accepted from server. Code: 535 Reply: 535 5.7.8 Error: authentication failed: authentication failure

Posted by Brian @ 4:22 pm on March 27th 2012

Beng Melea, Cambodia

My last visit to ruins on the trip turned out to be the best. Beng Melea is a semi-destroyed fortress from the early 11th century, about 65km from Angkor Wat. I scored a guide that took me inside, around, and on top of this magnificent site, to places that most tourists never take the time to explore.


Posted by Brian @ 4:22 pm on March 27th 2012

Koh Ker, Cambodia

Today I visited the royal city of Koh Ker, abandoned in 944 A.D. It’s about 130km or more from Angkor Wat. I was the only one here at Prasat Pram. This was my favorite place there, where the trees seem to explode out of the top of these thousand year old temples.


Posted by Brian @ 7:03 am on March 18th 2012

Things I did to fix my HP DV7 in Ubuntu

I have an HP dv7-6b78us laptop, which is fairly decent. Here’s a list of the things I had to do in order to get it to work properly in Ubuntu 11.10 64bit:

add to rc.local:
modprobe -r psmouse
modprobe radeon
echo OFF > /sys/kernel/debug/vgaswitcheroo/switch
exit 0

The first line in the above turns off the touchpad, which I never use. If I needed to use it I could:
sudo modprobe psmouse
The second line loads the open source ATI Radeon driver, the third line turns off the ATI card so it doesn’t suck power. The Intel graphics card is plenty powerful for my needs.

set brightness:
echo 2000 | sudo tee /sys/class/backlight/intel_backlight/brightness
The brightness keys don’t work. I haven’t yet assigned a command to the right keys but I’ll update this when I do. Replace 2000 with a value you want; look at /sys/class/backlight/intel_backlight/max_brightness for the max value.

# fix mic on dv7
options snd-hda-intel model=dell-s14 power_save=0 power_save_controller=N
(enable subwoofer but break mic:options snd-hda-intel model=ref)
#Fix dropping networking on resume from suspend
options iwlagn bt_coex_active=0

Make sure proprietary radeon drivers are blocked
blacklist fglrx

Optimize SSD (if you have an SSD that is):
add noatime,discard to main drive
tmpfs /tmp tmpfs defaults,nosuid,size=1g,mode=1777 0 0
echo deadline > /sys/block/sda/queue/scheduler
echo 1 > /sys/block/sda/queue/iosched/fifo_batch

Fix video mode error on boot:
sudo chmod a-x /etc/grub.d/05_debian_theme
also #24

Next Page