Traffic Control on Linux with FireQOS

In order to make full use of my half-duplex WiMAX link, I started looking for anything and everything I could use to optimize it. Linux has some pretty decent utilities with iproute2 and netem to handle these type of configurations. They don’t compare to OpenBSD’s PF, but they work once you get the setup in place.

Due in part to how ugly TC is out of the box, I really like FireQOS for defining the basic configuration. The developer also makes a great iptables wrapper called FireHOL, but iptables rules are easy enough to write in my opinion.

I wanted to share my FireQOS script for those who may have similar needs. It prioritizes my traffic with the following basics:

  1. VOIP – Commits 30kbit no matter what else is going on. This is sufficient for a single G.729 SIP connection
  2. Interactive protocols such as DNS, SSH, and XMPP receive 20% of the bandwidth
  3. Facetime – Committed 200kbit for video streaming
  4. VPN connections (PPTP/IPSEC/OpenVPN) are given 20% of the bandwidth
  5. Surfing is given majority of bandwidth with 60%
  6. Synacks, Mail, and Usenet bring up the rear with whatever is left. They will consume available bandwidth if nothing else is going on

As I write this my network is function just spiffy with no issues streaming via SONOS and downloads via USENET. I am very happy with the config.

From /etc/firehol/fireqos.conf

DEVICE=enp3s0
INPUT_SPEED=1910kbit
OUTPUT_SPEED=200kbit
interface $DEVICE world-in input rate $INPUT_SPEED $LINKTYPE
 class voip commit 30kbit
 match udp port 5060 
 match udp dports 10000:10100
 match sports 3478,5349
class interactive commit 20%
 match udp port 53
 match tcp port 22
 match tcp port 2222
 match tcp port 8022
 match icmp
 match tcp sports 5222,5228
 match tcp sports 5223
class facetime commit 200kbit
 match udp ports 3478:3497,16384:16387,16393:16402
class vpns commit 20%
 match tcp port 1723
 match gre
 match dport 1195:1198
 match tcp port 1701
 match tcp port 500
 match udp port 500
 match udp port 4500
class surfing commit 60%
 match tcp port 80
 match tcp port 443
class synacks
 match tcp syn
 match tcp ack
class default
class mail
 match tcp port 143
 match tcp port 993
 match tcp port 25
 match tcp port 465
 match tcp port 587
class usenet
 match tcp port 563
interface $DEVICE world-out output rate $OUTPUT_SPEED $LINKTYPE
 class voip commit 30kbit
 match udp port 5060
 match udp sports 10000:10100
 match dports 3478,5349
class interactive commit 20%
 match udp port 53
 match tcp port 22
 match tcp port 2222
 match tcp port 8022
 match icmp
 match tcp dports 5222,5228
 match tcp dports 5223
class facetime commit 200kbit
 match udp ports 3478:3497,16384:16387,16393:16402
class vpns commit 20%
 match tcp port 1723
 match gre
 match sport 1195:1198
 match tcp port 1701
 match tcp port 500
 match udp port 500
 match udp port 4500
class surfing commit 6%
 match tcp port 80
 match tcp port 443
class synacks
 match tcp syn
 match tcp ack
class default
class mail
 match tcp port 143
 match tcp port 993
 match tcp port 25
 match tcp port 465
 match tcp port 587
class usenet
 match tcp port 563

 

The machine is self aware…

I live in the boonies now, but thankfully we have some semblance of broadband with SpeedConnect. It is a WiMax setup with a modem that needs to be reset once a day (sometimes more if I am downloading ISO’s) and only connects at 10Mb Half-Duplex.  Better than nothing I suppose.

Originally I just succom to needing to wake-up, hit the head, and then hit the server room to pull the power. The geek in me couldn’t take it. Enter an extra Wemo Insight I had lying around. Initially I attempted to set up a rule that reset the switch (and thereby the modem) and coincide that with a cron script to bring down and back up the connection.

Luckily the Wemo has a pretty decent SOAP interface as outlined here. Script now runs by itself, with no wemo rules (which suck), and restarts the connection. To do this yourself:

  1. Linux Box. Mine happens to be the Server behind the FW
  2. ouimeaux installed
  3. Cron daemon of sorts
  4. Magic!

It makes me giddy with joy to have the machine watch the other machine. Technology is amazing

unnamed

What do I want to do when I grow up?

Circumstances were such that I could not make a more public notification when it actually occurred, but I am now able. I have sold my portion of Spec Ops Technology and will be moving on to new and exciting things for which I have yet to fully determine.

It is such a bittersweet moment in life to look back on the progress and effects we have done as a company. We had such humble beginnings and desires that were quickly overshadowed by the reality of success. During my tenure as Co-Founder and Managing Partner, we have done amazing things and I have had a fascinating life. The memories formed and the relationships forged through the countless travels will be forever a shining moment.

My decision to do this was made over months of deliberation and introspective review. Some of you closest to me have worried aloud about the identity of I have inherited from this adventure. Fear not as it has enriched, but not been the foundation of my being. With the quiver full of knowledge, understanding, and wisdom from this I hope to venture into something new and different.

Thanks to all of you who supported and assisted myself and the company through the years. In the beginning there were very few who supported an undertaking when the market was so shaky. We succeeded, Spec Ops Technology under Anthony’s guidance will continue to succeed, and I hand over the rest of the reigns knowing those I care about will be taken care of.

Alicia and I are timidly exhilarated at the possibilities. I will miss the life I am leaving, but cherish that which it afforded. Thank you

ADS-B Receiver and Plotter with Arch Linux

I love aviation and love software defined radios so building an ADS-B receiver and plotter was high on the lists of to-do. In Standish Michigan there are not a lot of fly overs so I wanted to be sure to capture those that happened. Haven seen now a few A-10’s on low pass it only fueled that desire :)

I use yaourt for my AUR package management, but whatever tool you use should be capable.

  1. yaourt dump1090-robb
  2. Plugin the RTLSDR Dongle. I use a cheap dongle off Ebay with the following lsusb dump: Bus 003 Device 006: ID 0bda:2838 Realtek Semiconductor Corp. RTL2838 DVB-T
  3. As a standard user enter into a terminal dump1090 and make sure that the software can use the RTLSDR device and begin plotting information. If you cannot see this text you will need to troubleshoot your device. You can try running with sudo dump1090 to decide if this is a permissions issue quickly
  4. After verifying you can use the dongle we will now run dump1090 in an interactive and web server mode with the following command. Note that I run dump1090 on port 7070 instead of the default 8080 as I already have something occupying that port: dump1090 –net-http-port 7070 –interactive –net –phase-enhance –aggressive
  5. Open a web browser and enter http://127.0.0.1:7070 and compare the live updates in the terminal with the plotting. You should see ADS-B hits.

I have done all my captures thus far on the included DVB-T antenna and it works pretty well. As I am on the road I am not near the home lab to produce a better antenna.

Selection_007

Spiffy Schmidts one year on…

Today marks the 365th day we have been blissfully married. It is hard to believe as it feels like yesterday we were standing on top of the mountains in the Carolinas saying “I do.” We have had the most amazing first year I think any married couple could request.

Two days before we exchanged nuptials I flew home from Dubai. We had planned to elope and best I could the schedule for work was squashed to fit that. After 16 hours in the air we switched the suitcases and drove South. The winery was beautiful and the little moment that we shared was just for us. We couldn’t have asked for anything more perfect for us as we are loners in this great big world. Right after we were married I jumped back on a plane for the United Arab Emirates.

Homebase has been Abu Dhabi as we traveled the globe and I think that is the perfect part of all this. My Father once told me that the best thing a newly married couple can do is leave family after tying the knot. We unexpectedly took this to the extreme visiting 20+ countries for work and pleasure. While we had no honeymoon, we became citizens of the world. Before we were brought together, Alicia had only seen small portions of the United States. I took such joy in watching her experience the things that seemed normal to me. I, together with her, saw these places anew for the first time.

What I have learned from being married for a year:

  1. Share everything and be open. You need to be able to have honest conversations about hopes, desires, wants, and fears. This extends to the technology world also. There is no email or Facebook account we can’t both access. This along with sharing our time together means that there is an open forum.
  2. Talk more. When we do argue it is because I get quiet and she wants to talk. Being 29 when we were married I had my way of doing things and my own ways to fix things. This is a learning process in shifting the tool set to include her.
  3. Be silly.
  4. Workout Together! Becoming healthy together (especially while clocking in 100000+ Km of travel a year) is a wonderful thing to keep you baselined.
  5. Have hobbies. This is a little tough as we usually live in hotel rooms, but even then she knows to let me play a marathon match of CivV every so often and she spends a few hours at the pool reading. Being married doesn’t mean being constantly joined in the same room.
  6. Mein Haus ist dein Haus plain and simple.
  7. I usually handle all things dealing with the money, but I always make it a point to key her into the nuances of the finances. Sometimes it seems out-of-place; “Baby come look at the details on the emergency fund in relation to our investments this quarter,” but I feel more secure knowing she knows we are good.
  8. Family and Friends are a world away (sometimes literally and sometimes emotionally), but my wife is 4 meters away. Draw together in the face of anything the world tosses your way and learn to draw on the other person for strength.
  9. Have lots of sexy time
  10. Learn the value of a good bottle of wine and dinner to relax together

If I had to look back and point out my favourite moments this year other than obviously getting married…

  • Becoming Lord and Lady Schmidt
  • Learning my wife cannot dance
  • Being able to speak German together in public places. It allows for such comments as “Scheiße aussehen. Das Mädchen Hintern ist groß!” with no worries on who is listening in most places :)
  • Having Christmas in our little apartment in Abu Dhabi
  • Seeing a shark in the Maldives and freaking out
  • Having Turkey in Turkey on Thanksgiving
  • Showing her my home town of Bitburg and hanging out in Trier
  • Becoming yuppies together
  • Taking pictures next to all the border crossings as we go places

 

Binary makes me giggle