Press "Enter" to skip to content

nuxx.net Posts

nginx for HTTPS Request Logging

Consider the following situation: You have a web app from a vendor and during a security scan it crashes. The web app is running over HTTPS with your certificates, but nor the scanning tool or web app offer sufficient logging to see exactly which request caused the crash.

Because you can’t decrypt HTTPS without access to a client key log file (or making a bunch of TLS changes), and the client is a security scanning tool, Wireshark is not an option to see the triggering request. Fiddler is also likely out, as that’d require the security scanner to trust a new root cert. So what can you do? Stick something else in the way to proxy the connection, logging all the requests!

Having access to the private certificates for the server this is quite easy: set up nginx as a proxy. The only wrinkle is that getting access to all of the request headers requires Lua, so you’ll need to ensure your nginx install supports this. On macOS this was easy using Homebrew to install nginx from denji’s GitHub repository (the default nginx doesn’t support Lua):

brew tap denji/nginx
brew install nginx-full --with-lua-module --with-set-misc-module

This configuration uses the web app’s certificates in nginx to proxy requests it receives to your main site, logging the client IP, request, headers, body, and request status to intercept.log. Requests are broken out by line to make for easy visual reading. You may wish to move this all on to one line to make parsing easy:

events {
}

http {
    log_format custom 'Time: $time_local'
                      '
'
                      'Remote Addr: $remote_addr'
                      '
'
                      'Request: $request'
                      '
'
                      'Request Headers: $request_headers'
                      '
'
                      'Body: $request_body'
                      '
'
                      'Status: $status'
                      '
'
                      '-----';

    server {
        listen 443 ssl;
        server_name example.com;
        access_log /path/to/intercept.log custom;
        ssl_certificate /path/to/cert.pem;
        ssl_certificate_key /path/to/privkey.pem;

        location / {
            proxy_pass https://example.com;
            proxy_set_header Accept-Encoding ''; 
            set_by_lua_block $request_headers {
                local h = ngx.req.get_headers()
                local request_headers_all = ""
                for k, v in pairs(h) do
                    request_headers_all = request_headers_all .. ""..k..": "..v..";"
                end
                return request_headers_all
            }
        }
    }
}

To put this in place, ensure that requests from the scanner go to nginx instead of the web app and then nginx will forward and log the requests. There are a few ways you could do this:

  • Run nginx on the same server as the web app, move the web app to listen to another port for HTTPS, and set proxy_pass to the other port: proxy_pass https://example.com:4430
  • Run nginx on a new server, change the DNS records for the site to point to the new server, and point nginx to the old server by IP: proxy_pass https://192.168.10.10
  • If the scanner tool’s name resolution can be adjusted, such as via a HOSTS file or custom configuration, point it to the nginx proxy for the site name.

To test you can use a web browser on a client computer and a HOSTS file to point the original hostname nginx. To get the screenshot above I ran nginx on iMac running macOS, then in a Windows VM I changed the HOSTS file to map nuxx.net to the iMac’s IP. Firefox on the Windows VM then sent requests for nuxx.net to nginx on macOS which logged and proxied the requests out to the real nuxx.net.

Comments closed

Pi-hole (and PiVPN) with Ubiquiti UniFi

Pi-hole

My home network is based around Ubiquiti’s UniFi, with a Security Gateway (USG) handling the NAT/firewall/routing duties. For ad blocking and to have better control over DNS I use Pi-hole running on a Raspberry Pi.

With the following settings you can have the two working well together with UniFi doing DHCP and Pi-hole doing DNS. Internal forward and reverse resolution will work, which means hostnames will appear properly for internal devices on both consoles while requests are still appropriately Pi-hole’d.

Here’s how:

  • Set up the Pi-hole and put it on the network at a static IP.
  • In Pi-hole, under SettingsDNS turn on:
    • Never forward non-FQDNs
    • Never forward reverse lookups for private IP ranges
    • Conditional forwarding with IP address of your DHCP server (router) as the USG
    • Local domain name (optional) as your internal DNS suffix
  • In the USG, set DHCP to hand out the Pi-hole’s IP for DHCP Name Server.
  • In USG, under ServicesDHCPDHCP Server, set Register client hostname from DHCP requests in USG DNS forwarder to On.
  • Leave the WAN interface’s DNS set to something public, such as what the ISP provides or Google’s 8.8.8.8/8.8.4.4 or whatever. This ensures that if the Pi-hole goes down then the USG can still resolve DNS.

After setting this up clients will use Pi-hole for DNS, as configured via DHCP. Requests for hostnames and addresses on the local network (shortnames or local suffix) will get forwarded to the USG, ensuring ensures that internal requests work properly.

PiVPN

Taking this a step further, I also have PiVPN running on the same Pi, to provide an endpoint for connecting into my home network via Wireguard. Pi-hole and PiVPN integrate very nicely and are designed to work together, making the setup very smooth.

By default, PiVPN sets the Pi-hole as the DNS via a DNS option in the [Interface] section of the config. To ensure appropriately geolocated search results when connected to VPN, use a DNS which supports Extended Client Subnet (ECS) (under SettingsDNS) on the Pi-hole.

(For reference, I’m running Pi-hole on a Raspberry Pi 4 Model B with 2GB of RAM and it has plenty of overhead for both Pi-hole for ~20 devices and sustaining 50 MByte/sec via Wireguard. The Pi-hole section of this was originally written up here on Reddit.)

Comments closed

For Sale: Salsa El Mariachi Single Speed

After a lot of thought I’ve decided to sell my beloved steel Salsa El Mariachi Single Speed. This is an amazing cross-country (XC) single speed, and I love riding it, but it’s time for it to go.

This is a custom build, based around the final year of the beloved Salsa El Mariachi Single Speed frame and rigid fork. While the frame, headset, crank, and bottom bracket are original, everything else has been upgraded to make one of the best single speed builds you’ll find. This is the updated El Mariachi geometry with kinked seat tube and shorter chainstays to improve handling on single track. And yes, it rides wonderfully.

Originally shipping with only a rigid fork, this bike has both the original fork and a Fox 32 (with GRIP damper). Crown races and brake adapters are fitted to both, so switching between forks can be done in a couple minutes with a multi-tool. The fork was rebuilt by Fox in early 2020 when the GRIP damper upgrade happened, so it’s in great shape and ready to ride.

Cosmetically the frame is in great shape. There’s a couple small rub marks from heels and kicked up sticks, and one small scratch on the top tube just behind the headset, but no dents or serious marks. The wheels are solid and true and the tubeless sealant was refreshed on November 30th. Tires are in good shape, with plenty of life left.

Appropriate for a single speed, the wheels are built around a Hope Pro 4 Trials/Single Speed rear hub, and matching front. With 88 points of engagement there’s never any slop when ratcheting over stuff or spinning at high RPMs. A single speed-specific rear hub means a more symmetric (and strong) wheel build. These wheels are built around WTB KOM i29 rims to keep the tires nice and wide, and Sapim D-Light spokes to keep things light but strong. Spoke tension is spot on and the wheels have never needed any truing, but spare spokes and nipples (from when the wheels were built) will be included.

The drivetrain is built around Surly stainless steel cog and chainring and the Surly spacer kit. Gearing is currently at 32:17 — perfect for everything from River Bends to Stony Creek to Pontiac Lake — but if you’re wanting something a little taller I’d be glad to swap to a 16t. With Salsa’s Alternator dropouts adjusting chain tension is simply a matter of loosening a couple bolts, turning a couple set screws, and snugging things back down. Included is a large bottle of Squirt chain lube, same as has been used on the chain to date (it works well for single speeds). Also included are the original colored chainring bolts, which I replaced for black when I removed the other orange bits from the bike.

Finishing it all off are a Thomson seatpost clamp, Thomson X4 stem, Salsa bar, and super-durable Cane Creek 40 headset. Grips are the super-comfortable ESI Extra Chunkies with BMX-sized aluminum bar plugs for appropriate fit with foam grips.

I’m ~5’10” with a 30″ inseam and the bike fits me perfect. For reference, I also can ride a Large in Salsa bikes with a short stem, a stock large in Specialized stuff, and either 54cm or 56cm ETT road bikes with appropriate length stems.

Price is US $1300 (Sale Pending), detailed high-res photos can be found here.

(MSRP on the original bike was $1499, and between the wheels, Thomson components, and everything else there’s over $1000 in upgrades in the bike.)

Specifics of the build are as follows. If you’re interested, please email steve@nuxx.net. I’m glad to ship the bike at the buyer’s expense, or I can meet up outdoors in the Shelby Township area.

Frame: Salsa El Mariachi SS (Medium, Gray Green, 2015)
Suspension Fork: Fox 32, 100mm Travel, Tapered, 15mm TA, Upgraded to GRIP Damper in 2020
Rigid Fork: Salsa CroMoto Grande, Tapered, 15mm TA, With Maxle
Headset: Cane Creek 44 (Black, ZS44/EC44)
Crankset: Stock Single Speed
Bottom Bracket: Stock (Great Condition)
Chainring: Surly 32t (Stainless)
Cog: Surly 17t (Stainless)
SS Spacer Kit: Surly
Chain: SRAM 8 Speed
Brakes: Shimano Deore M615
Brake Rotors: TRP, 180mm front, 160mm Rear
Stem: Thomson X4, 100mm x 0°
Bar: Salsa Salt Flat (710mm)
Seatpost: Thomson Elite, 410mm x 27.2mm
Seatpost Clamp: Thomson
Hubs: Hope Pro 4 Trials/Single Speed, Black
Rims: WTB KOM i29
Spokes: Sapim D-Light
Tires: Schwalbe Racing Ralph 2.35″ (Tubeless)
Tubeless Valves: Stan’s
Tubeless Sealant: Stan’s
Saddle: Specialized Phenom (143mm)
Grips: ESI Extra Chunky (Black)
Bar Plugs: Black Aluminum
Pedals: VP Components VP Grind (VPE-535 / Composite)

Comments closed

Thoughts on Classic and Modern Mountain Bike Fit

High Rock Bay, Keewenaw Peninsula, Michigan (East End of Point Trail Phase II)

How I Confused Myself

I’ve been riding mountain bikes for around 13 years, drop bar bikes for for seven on gravel and occasional road stuff, and spend a few hours a week on a trainer in winter. During all of this I’ve had a particular interest in ensuring my bikes fit well, so when I switch between bikes the contact points (pedals, saddle, grips, brakes, shifters, etc) are consistent and the bikes’ other characteristics (geometry, travel, tire size, etc) are the difference in how they ride. I like knowing that I can hop on any of my bikes and the fit won’t feel weird or limit what I can do or how long I can ride for.

In pursuing a good fit I’ve had a total of two full bike fits (Ryan Katulic at Apto Cycling and Jessica Bratus at fitmi!), two small/adjustment fits (Ernie Dell at Cycletherapy and Chris Goddard at Fraser Bicycle). I’ve read a ton of articles and papers on bike fit and spent countless hours measuring my bikes and building and using spreadsheets to compare and calculate geometry, tweaking everything from stem length and bar sweep to saddle height and setback.

Between these fits and my research everything coalesced into a spreadsheet of measurements (crank length, saddle setback from crank spindle, bar distance from saddle nose, bar drop from saddle, etc) that worked very well and I could copy to all my bikes. Switching between, say, my hard tail Salsa El Mariachi XC bike, my Salsa Mukluk fatbike, and my Specialized Camber trail bike all felt the same fit-wise; the bikes’ geometries and suspension made them ride differently. As the 2016 Camber is a “modern” geometry mountain bike, to make the fit match I had to place the saddle as far rearward as possible and use a relatively long (75mm) stem. At the time I figured this was just what needed to be done.

The saddle height and setback was the same across all my bikes — road and mountain — and in general it seemed to work well. My back might get a little sore when doing a lot of hard seated climbing, but isn’t that just what happens when leaned way over and pushing on the pedals?

As time moved on and my technical mountain biking abilities advanced I began looking at new bikes. I found that what’s called “modern” mountain bike geometry — steeper seat tubes, dropper posts, longer reach, shorter stems, and wider bars — was present on all new bikes. This was a step beyond the Camber, which had already pushed what I could do with my chosen bike fit. Seat tubes are getting steep enough that I’d need a setback post to match my current setup, but there’s very few setback droppers available and they are rarely seen. Wider bars and shorter stems, touted for handling and stability, seemed they would compromise handling on twisty trails.

Clearly the bike manufacturers weren’t all screwing things up, so I figured something had to be off with my thinking about bike fit as it relates to modern mountain bike geometry, so I set out to understand the changes.

What I came to realize was that much of the traditional mountain bike geometry and fit was based around effectively do-all bikes; hard tail XC (cross-country) geometry frames that were great when pedaled hard on relatively smooth surfaces, handled well in tight and twisty trees, and were manageable over rough sections. They climbed fine, descended fine, cornered fine, but still had roots in staying seated, pedaling hard, standing to eek out short/steep pitches; going fast while putting out power and dealing with rough spots along the way. Sure, they could be ridden very capably on serious, rough mountain bike trails, but they are more at home on smooth trails with slow corners.

As mountain bikes evolved the “modern” geometry made leaps and bounds with off-road handling with minimal compromises from the classic do-all XC bikes. With these modern geometry bikes, attempts at copying a classic mountain bike’s fit using the classic saddle setback and saddle-to-bar distance will be frustrating and result in an awkward-steering bike. And it’ll throw away many of the modern geometry’s benefits.

What I realized is that my fit was for a classic mountain bike geometry, thus for a modern bike I needed to learn more about bike fit.

Steep Seat Tubes and Dropper Posts

I feel that a dropper post is practically essential equipment for a mountain bike. The ability to get the saddle down and out of the way opens up possibilities for handling that outweigh added mechanical complexity and weight. For everything from moving the saddle away to float through blown out gravely downhills and allowing the bike to move around under me on rough stuff, from moving the saddle for leaning, balancing, and railing berms and flat corners to jumping something along a trail, dropper posts have significantly enhanced my mountain bike riding. Like any bike control dropper posts have a learning curve, but once understood it make riding more fun.

Modern geometry frames tend to have fairly steep seat tubes, and copying my classic saddle position was going to require a setback seatpost. Nearly every dropper post out there (except for the Command Post IRcc) has no setback, which meant I couldn’t have a modern frame, a dropper, and the saddle setback I’d previously used; this seemed like a problem.

It’s often claimed that a steeper seat tube angle makes climbing easier, but…. how? At first this seemed silly, because wouldn’t you want efficient pedaling via an optimized saddle-crank position? Which, for me, required more setback than a modern frame and seatpost would allow?

Climbing is typically where one puts out maximum power on a mountain bike. Looking at how just a couple of degrees of seat tube angle can move the saddle too far behind the crank, it turns out that even a moderate climb effectively moves the saddle far enough back to be a problem. For example, with a 725mm saddle height on a 75° seat tube, a basic 5% climb changes the effective seat tube angle by ~3°, moving the saddle ~35mm rearward. (These are rough numbers that presume the bike rotates around the bottom bracket.)

Think of how uncomfortable an inefficient it would be to ride with your saddle an inch and a half behind where it should be… This is why steeper seat tubes are said to climb better: they tend to result in an optimised-for-power position when the bike is tilted up and climbing. Even better, being centered on the bike instead of hanging over the rear wheel enhances control when climbing; chunky roots and rocks are easier, with the front end less likely to lift and wander around.

When on flat ground or descents the saddle is a bit forward for optimal pedaling, but that’s okay. It feels fine, it’s still possible to put out plenty of power, and it’s a great trade-off for improved climbing.

Sometimes when riding hard and doing a lot of seated pedaling, particularly when climbing on a full suspension, my lower back would start to hurt. While strengthening my core helped, it turned out that modern geometry did the most to sort this out, because moving the seat forward meant that when climbing my hip angle is more open and thus pulling less on my lower back. Now when climbing hard on trails while seated my lower back feels better, the same as when I’m really hammering on the road.

While this steeper seat tube angle makes a slight compromise in that it’s not quite as efficient when pedaling on dirt road type stuff, it’s fine. I’ve done long rides linking up trails using dirt roads, and even long dirt road rides (eg: The Crusher 40-mile) and the different position when pedaling on flat ground isn’t noticeable… The improvements in off-road climbing more than than make up for it.

Long Frame Reach / Short Stem / Wide Bar

When I first tried out a wider bar (760mm, from my usual 710mm) with what I thought was a short 75mm stem on a nearly straight bar I felt the bike steered slowly. Pedaling seated and weaving through the tightest sections I knew of, it felt like I was constantly wrestling the bike and dumping it into corners to stay on the trail. It didn’t feel in control.

When I began looking at modern geometry mountain bikes, I was amazed at just how long the frame reach (the distance forward from the bottom bracket to the center of the top of the head tube) was. Going purely off of frame numbers it looked like unless I went to a short stem — which seemed awkward — I should be riding smaller size frames than in the past.

Narrow trees on the North Country Trail near Mile 682.

It turns out that what I thought was a shorter stem really wasn’t, and I needed an even shorter stem (60mm) for the bike to fit me properly. With the wide bar spreading my arms out more, and with the longer reach of the frame, the stem I had was too long. The awkward feeling came from riding what was effectively too large of a bike and needing to steer with my shoulders instead of my arms. By moving to an appropriate length stem the distance from my feet to my hands (more on this later) became appropriate and steering once again felt under control.

For a given size frame, modern mountain bike geometry will have a longer reach, so the overall distance forward from the bottom bracket to the grips ends up being the same when paired with a shorter stem. The shorter stem better positions the body over the center of the bike, making for a more stable ride.

Wider bars offer greater leverage, which makes everything from countersteering around fast corners to staying on a desired line in rough terrain easier. As wider bars spread out one’s arms, the stem needs to be even shorter to keep from being leaned over too far reaching for bars that are too far away. By having the bars an appropriate distance from the body steering is done with the arms, eliminating that whole-body wrestling feeling just to get around corners.

While a modern geometry bike does steer a bit slower at low speeds due to the shorter stem, wider bars, and slacker head tube angles, getting the right length stem keeps steering in the arms, mitigating most of this. For the sluggishness that remains, the benefits strongly outweigh the negatives; a well-fit bike has well balanced handling whether technical or not at low or high speeds.

Dialed Brought It All Together

The RideLogic basics of fitting a bike.

In researching fit to modern geometry mountain bikes, I came across Lee McCormack’s book Dialed: The secret math of a perfect mountain bike setup about his RideLogic bike fit. While some parts are a bit prescriptive and didn’t give me the understanding I wanted, the ideas and results seemed interesting, so as an experiment I went about fitting all my bikes using this method.

For the basics of this method, check out Lee McCormack’s Guide to Bike Set-Up on Pinkbike. For specifics, buy a copy of Dialed here and read it. (Neither this post nor the Pinkbike article are a replacement for the book. I suggest getting the PDF as it’s cheaper than print, and having it in print doesn’t add much value.)

In Dialed and the RideLogic fit the focus is a measurement called RAD (Rider Area Distance); the distance from the bottom bracket spindle to where your hands sit on the bars along the centerline of the bike. This is how well your bike fits your body, and unless your frame is way too large or small, can mostly be handled by changing the length of your stem.

Dialed then focuses on RAAD (Rider Area Angle in Degrees), or the angle of that line between the bottom bracket/grip and the ground. The shallower the angle the more flat/XC-friendly the bike is, the steeper the more downhill/trail-ish it is. Recommendations for RAAD range from ~55° for XC race to ~57° for XC/trail all the way to ~62° for downhill.

Finally, SHO (Steering/Hands Offset), or the distance your hands are forward of the steerer tube axis. This should be set up for the type of bike and riding you do, which per Dialed close to 0mm is ideal for trail / DH riding, but XC racers will often find themselves with something much longer. Changing stem length is the easiest way to change SHO, but needs to be balanced with RAD being more important. For example, I currently have a ~27mm SHO on my trail bike, but can’t get this much shorter without decreasing the RAD too far.

(Dialed goes into far more, like how to measure your body to determine your RAD needs, how to choose a frame based on your measurements, bar width, crank length, and saddle positioning specifics, so read the book and watch the referenced videos.)

Once you know your RAD and the RAAD and SHO for your type of bike and riding, you can swap around stem length/rise, spacers, and handlebar rise and sweep to get it right for you. Position the saddle for appropriate leg extension and generally pretty centered on the seatpost, and for most people you’ll be fine. (Remember: All that matters is hand position relative to your feet and the bike’s steerer axis. Whether you use a riser bar or stem or add spacers, all that matters is where your hands end up.)

Thus, so long as your bike is in the right size range, doing a really good setup of a new bike is only a matter of measure, adjust, and ride.

Standing over my bike, with pedals resting on two picnic tables, to check RAD.

Dialed suggests placing your bike in a gap, such as between two picnic tables, with pedals balanced on each side to see how your current bike’s RAD matches your body. In November 2019 I visited a local park, pushed some picnic tables together, and checked out my RAAD, just like Lee does in his demonstration videos. I found my Salsa El Mariachi SS and Mukluk were already perfect RAD, but the Camber’s was too long.

Fitting on a 15mm shorter stem on the Camber fixed the RAD problem and I moved the saddle forward from my road-like slammed-back previous position to something centered and average. I then rode the it all spring and summer on everything I could in Michigan, but from the first test ride it felt right. I’d been riding it for three full years thinking it felt fine, like a big trail bike that I sometimes had to throw around; I thought this was normal for that kind of bike. After going through the Dialed fit, mostly to adjust RAD (and consequently with a shorter SHO) and putting the saddle into a standard modern geometry position, it all came together. Whether flat/twisty trails, long climbs and descents, techy/steep rock, loose gravely sand — pretty much everything I could find in the Lower and Upper Peninsulas of Michigan — the bike felt great.

Specialized Camber set up for measuring RAD, RAAD, and SHO.

So why did it work? If the bar is too far away, and especially with a long stem, steering is mostly done by leaning the body and slightly turning the arms. This isn’t good for handling a mountain bike, as good bike-body separation (a cornerstone of handling a bike) requires steering without needing to move the torso too much. The shorter the stem, and the closer the bar is to the optimal distance from your body, the more you steer with just your arms.

When RAD is set up right, leaning and countersteering on fast stuff works well, turning the bars in slow stuff is comfortable without feeling like a wrestling match, and lifting the front end of the bike and navigating rough stuff is comfortable. And all of this good handling requires both a short SHO (to support steering with the arms) and having the appropriate RAAD (to keep properly balanced on the bike).

That’s when it all made sense: Modern mountain bike geometry, with a longer reach, shorter stem, and wider bars, allows for a shorter SHO with appropriate RAD and RAAD. This allows steering more with the arms resulting in better handling on all surfaces where mountain bikes get ridden. This is why modern mountain bikes have these (modern) geometries.

How I Fit Myself to a Modern Mountain Bike

After finally realizing how modern mountain bike geometry and the Dialed method of fitting a mountain bike work in tandem, I set out to use it when building up the All-City Electric Queen and the Salsa Timberjack which replaced it. Starting with my desired RAD (~835mm) and RAAD (~57°) I did the following:

Measuring RAD and RAAD on the Timberjack.
  1. Use the stack and reach of the frame, coupled with the headset and bar dimensions to estimate stem and spacer requirements to reach desired RAD and RAAD. I typically check a couple size frames and pick one that’ll work best. (yojimg.net’s Stem Comparison Tool is very helpful for this.)
  2. Assemble the bike with a placeholder stem, then set it on level ground. (I clamp the rear wheel to a post in the basement, then use a Flop Stop Handlebar Holder to hold the front wheel straight.)
  3. Tape a piece of string, taut, between the center of each hand position.
  4. Place a long straightedge along the string, using masking tape to hold it in place.
  5. Insert a hex tool in the bottom bracket bolt, wrap a string around the hex tool, and secure the other end to the straightedge.

With a tape measure, dial gauge angle finder, and a hex tool to fit in the top cap I can get all the necessary measurements:

  • RAD: Distance along the string from BB to hand position.
  • RAAD: Angle of string from BB to grip.
  • SHO: Distance from string between grips to steerer axis. (Inserting a hex tool into the top cap to extend the steerer axis makes this easier.)

Then, based on the measurements of the bike’s current RAD, RAAD, and SHO, the stem, spacers, and bar can be adjusted or swapped to get my desired setup.

On my Timberjack I was able to get a 835mm RAD, 58° RAAD, and 27mm SHO during assembly; from the first ride it handled perfectly. Setting the saddle to 735mm height (top/center of saddle to BB spindle) is spot-on for 175mm cranks, and just slightly behind centered in the rails has been great for everything from pedaling on flat ground to grinding up 20% slopes.

With all of this together I now have a bike that fits me well, is comfortable when pedaling hard either on flat ground or when climbing very steep stuff, is easy to handle at low or high speeds, and handles great on technical trails. And thanks to this process I have a set of numbers, which I understand the reasoning behind, that can be used to set up a new bike to fit me properly and thus ride well.

The Obligatory Summary

A modern geometry mountain bike, properly set up with modern fit, comes together into a great package that is incredibly capable and fun to ride. Trying to force a classic fit and stem length on a modern frame doesn’t work well, and will result in a weird-handling less-capable bike.

By adopting modern geometry and using the methodology spelled out in Dialed it’s straightforward to get a good fitting mountain bike that makes riding easier and more enjoyable. Even if you think your fit is fine, it’s worth checking RAD, RAAD, and SHO and experimenting with suggested changes. You may be as surprised as I was with how a few small changes that make riding even better.

Leave a Comment

Industry Nine Trail S Hydra 28h Wheelset Hub and Rim Details

On my Salsa Timberjack I have a set of Industry Nine (I9) Trail S Hydra 28h wheels. These have been a great high-end yet thrifty wheelset, combining a relatively low cost and high quality 27mm internal width aluminum rim and straight-pull steel spokes with high-end Hydra hubs.

This wheelset uses a straight-pull hub that is not sold separately or listed on the website, which makes finding specifications a little difficult if one wants to rebuild the wheels with different rims, replace spokes, etc. I’m considering replacing the aluminum rims with some carbon fiber rims over the winter, so I set about gathering all the specs so I could look into options.

Thankfully I9’s customer service is top notch, and the folks there told me everything I wanted to know about the wheelset. Since this info is otherwise difficult to find, and to maybe save the support folks some hassle, I figured I’d share them here:

Industry Nine – Trail S Hydra 28h Wheelset (29er, XD Driver, Six Bolt) Specs:

  • Hubs: Industry Nine Hydra (28 hole, straight pull, six-bolt, XD driver, black)
    • Front (Diagram)
      • NDS Flange Ø (A): 46mm
      • NDS Center to Flange (B): 28mm
      • DS Center to Flange (C): 43mm
      • DS Flange Ø (D): 46mm
    • Rear (Diagram)
      • NDS Flange Ø (A): 46mm
      • NDS Center to Flange (B): 24mm
      • DS Center to Flange (C): 37mm
      • DS Flange Ø (D):60mm
    • Freehub Lube: Dumonde Tech PRO X Freehub Oil
  • Rims: Industry Nine Trail S (28 hole, 597mm ERD for 29er, symmetric / 0mm offset)
  • Spokes: Sapim Race Straightpull (303mm for 29er, 285mm for 27.5)
  • Nipples: Sapim Double square (14mm, 2.0mm, black, alloy)

(Note, these are for a wheelset purchased in May 2020, specs documented on 2020-Nov-20. These specs could change with future revisions.)

Comments closed

Mail-Hijacking Malicious Profile on iOS

I was recently asked to look at a family member’s iPad because it was no longer sending email. Turns out that it had been set up to use an additional email account that steals copies of all their outgoing mail. Unfortunately, they didn’t notice until the attacker’s system stopped working and the iPad started showing an error message. Besides the irritating (or worse) spam they saw, their stolen emails could have been used for anything from spear phishing to accessing one’s online accounts, impersonating them, phishing others, delivering targeted spam, fake news / propaganda, etc.

So how did this get set up?

Apparently at some point this person installed the My Accurate Forecast app [1]. Included in this app was a Profile — or a set of settings for Apple devices — that added a second email account with address lazaroburst@my.minbox.email. This account was also set as the outgoing server for their Hotmail (Outlook.com) account.

This person would then have seen all messages in this account, with notifications just like their normal Hotmail email. Worse, everything they sent, from any email account, went to the attacker first. As it’s a separate email account, all the normal spam and malware protections from a normal email provider don’t apply… It’s a firehose of junk straight to their mailbox, with outgoing mail theft frosting on top.

This is bad because not only does it end up with them getting more spam, it allows the attacker to know exactly what they sent and to whom, and to modify those messages before delivering them to the intended recipients.

I think this was likely generated based on geolocated advertising, but it’s possible this individual was specifically targeted. The signed Profile had a name of “WEATHER ALERTS” a description of “Tap ‘Install’ above to get your local radar forecasts and weather alerts in 48062”, showing its intent to deceive; trying to make the normal Profile installation security alert — which is supposed to warn the user of a change to important settings — look like part of an application install.

I’m unsure when this first got installed, but judging by the the Profile signing certificate expiring on December 8, 2016 it was likely within a year or two prior. (Unfortunately I didn’t check the issuance date before deleting the profile.) The Profile which made these changes was signed by secure5g.com, an “advertising” company which has ties to minbox.email (the Unsubscribe link at the bottom of the page is a generic link to a minbox.email page).

A post from June 2018 on Medium, Unwanted Profiles Pop Up in iOS Devices, Inviting Spam and Malware, reports the same problem almost two and a half years ago. Curiously, the handful of other posts I read about this (ref: 1, 2) didn’t mention (or maybe didn’t notice) the outgoing server change? Perhaps because they only noticed before things broke, or maybe this iPad somehow ended up different? (It does seem that at least one other app: Daily Bible Verse, included similar email hijacking.)

Cleaning this up these settings was easy, just a matter of removing the malicious Profile, outgoing mail account, and setting the Hotmail account back to using the appropriate servers. But, who knows what damage was done with the theft of the sent mail and receipt of spammy stuff.


[1] The My Accurate Forecast website still shows screenshots of the app, but does not link to any app stores. It also no longer appears in the Apple App Store, implying that it’s been pulled out.

Comments closed

SharkTapUSB Gen2 Review and PCB Details

For years I’ve used an eBay-purchased Net Optics TP-CU3 (now called Ixia TP-CU3-ST) copper 10/100/1000 Ethernet tap along with a StarTech USB 3.0 to Dual Gigabit NIC for getting external network captures from client computers [1]. The fan in the tap is dying and making a lot of noise. While not just irritating, I believe this is causing the tap to overheat resulting in occasional weirdness in the data [2].

As a replacement I now have a SharkTapUSB Gen2 from midBit Technologies, LLC, and so far it’s working great. Being a simpler device, with a USB NIC built in, it’s much more appropriate my needs. Smaller, simpler to connect, quieter (no fans), and easier to teach coworkers to use. At $249.95 (sold solely via Amazon) it’s also priced fairly.

The SharkTapUSB is a single unit about the size of a deck of cards that is inserted between two Ethernet devices and outputs the captured data to either an Ethernet connection or it’s built-in USB 3.0 gigabit NIC. It also gets power from USB 3.0, eliminating an external power supply. This is perfect for what I’m usually doing, which needing to watch data going in and out of a computer and analyze it in Wireshark.

While the TP-CU3 is excellent and served me well, it also was overkill. It has a bunch of features intended for permanent install / data center use, such as bypass relays to maintain connectivity during power failures, forced air cooling, redundant power supplies, and dual gigabit egress links to support monitoring saturated full duplex connections. Even when the built-in cooling fans are working properly, it’s loud enough to be irritating in a normal office (the SharkTap USB is silent).

Compared to the TP-CU3 there are three downsides to the SharkTapUSB, but for my needs I don’t see them being a problem:

  • Cannot Capture Sustained Full Duplex Traffic: The SharkTapUSB merges the network traffic between two ports and outputs it to a single gigabit NIC. If the traffic being captured is a sustained, full-duplex gigabit flow, this is too much for the capture interface and data will be lost. For me this amount of traffic is rare in practice, especially in situations where I need an external tap. (The SharkTapUSB has a 256KB buffer to accommodate short bursts of high bandwidth traffic.)
  • Link Electrical Status Not Propagated Between Ports: The TP-CU3 uses relays so that when one of the network ports is disconnected electrically the other one is shut down. For example, when the client PC is disconnected, the TP-CU3 drops the electrical link to the switch, so the switch sees the disconnect. The SharkTapUSB does not do this, and keeps the electrical link up on one side when the other is disconnected. Should this be a problem, such as when working with a switch that takes action on link state change, this can be sidestepped by unplugging cables.
  • Link Speed Autodetection: The SharkTapUSB cannot be forced to a particular port speed. However, it does set both ports to the lowest autodetected speed, so port speed can be controlled via settings on a connected device.

After looking at the SharkTapUSB’s block diagram I got curious how it’s actually implemented, so I opened it up to see and grabbed some photos of the Rev F PCB (top, bottom, jumper wires on bottom).

Here’s the notable components:


[1] While captures can be done locally (from within the OS), using tools like Packet Monitor or Wireshark or tcpdump, there are times when an external capture is more useful or the only option, such as:

  • Troubleshooting Intel AMT related issues, as AMT sits between the normal NIC and the external port.
  • Monitoring PXE.
  • OS’ where getting a local capture is complicated, such as Windows PE, embedded stuff in televisions, or mobile OS’ (eg: Android, iOS).
  • Investigating hardware offloads, as a local capture will show invalid data for things like TCP checksum as it’s not calculated before reaching the NIC.

[2] I looked into replacing the fan, but this doesn’t seem practical. The fan is a Sunon GB0535AEV1-8.B2445.GN, which is a combination heatsink and fan, and appears to be epoxied in place. While I can get one via eBay sent from China, I’m unsure if I’ll be able to remove the fan without damaging the chip. Instead I’ll keep the mostly-working tap around for rare occasions when full-duplex monitoring is needed, using the SharkTapUSB for day-to-day use. Perhaps in the future I’ll give a heatsink/fan swap a go…

Comments closed

Rebuilding Shimano SLX (BL-M7000) Brake Levers

Within the past few months I’ve started to notice oil on the main lever pivots of the Shimano SLX (BL-M7000) brakes on my Salsa Mukluk and the brakes have started to feel like they need a bleed. It was recommended that I try rebuilding them — cleaning them out and re-greasing the seals — before replacing.

Using some Danco Silicone Faucet Grease and following a couple of YouTube videos to understand the teardown process I was able to easily get both levers apart and back together, and after my first test ride they seem to be working great. I believe these were getting dirty after a few years of exposure to all sorts of conditions and the seals needed a bit of freshening up. (In this design the end of the piston and thus a thin piece of seal is exposed to the elements.)

The overall process was quite straightforward, and between these two videos (1, 2) I had no problems figuring out what to do. While the first video is a bit dark, the subtitles helped tremendously. The second is in Tagalog, but shows the process clearly. EV-BL-M7000-3978.pdf, Shimano’s exploded view of the lever, is also somewhat helpful but does not show the details of the piston nor the push rod. If you are reasonably mechanically inclined, and can work with small parts, you’ll have no problem.

Here’s the major steps, along with notes. These steps apply to both the BL-M7000 (SLX) and BL-M8000 (XT) levers and are likely applicable to other similar levers. I recommend that you do levers one at a time, or take photos as you go, to see how the parts fit together. The lever return spring is particularly fiddly to get into place and it’s location is not immediately obvious during reassembly.

Disassembly:

  1. Disconnect brake hose and remove lever from bar.
  2. Remove bleed port, squeeze lever a few times to drain excess oil.
  3. Remove the small rubber plug which covers the set screw holding the pivot pin (Lever Axle, #5 on EV) in place. Back out but do not remove this set screw (Lever Axle Fixing Bolt and Cap, #4 on EV).
  4. Press out pivot pin from underside using a 3mm hex wrench or rod to remove the lever. (I had to use a small hammer to loosen it as it was stuck in place.)
  5. Locate the T-shaped ball-end shaft which presses on the piston. Remove with a twisting motion on the head, snapping it into or out of the plastic guides.
  6. Locate the plastic pivot plate which has a hooked bottom for the pad contact adjust lever. Remove this; loosen by pushing it out via the holes in the lever body.
  7. Remove the pad contact adjust lever, which the pad contact adjust screw presses against. (This screw exists on both XT and SLX levers, although it’s externally blanked on SLX.) Depressing the piston with a ball end hex wrench and lifting the lever out with smooth jaw needle nose pliers makes this easier.
  8. Use a thin rod, such as a 3mm wrench, to push the piston and spring out via the brake hose end. Be careful not to mar the mirror-polished brake piston bore.
  9. Remove the other plastic pivot plate.

Cleaning:

  1. Wipe down the brake lever body to remove oil and gunk. Clean out the inside of the bore with a paper towel, being careful not to damage the mirror polish. I do not suggest submerging or using soap or degreaser as it’ll be difficult to clean out the reservoir half of the lever.
  2. Gently wipe off the piston and spring. Inspect the seals for damage. If they are damaged, you’ll need to find a new piston as these are key to the brake working and not leaking.
  3. Clean the lever and reach adjustment. (I used dish soap and a paintbush.)
  4. Clean the lever return spring. Do not bend this.
  5. Clean the plastic guide plates, being sure to not scratch the them.
  6. Disassemble and clean the T-shaped ball-end shaft. There are two small plastic caps, a bushing, an axle, and the ball end shaft. Take care of the plastic end caps, these slide in the guide plates to make everything work.

Reassembly:

  1. Reassemble the T-shaped ball-end shaft putting a bit of silicone grease in and on the bushing, in and on the plastic end caps, and on the ball end.
  2. Fit the pivot plate without the hooked bottom.
  3. Drop the spring into the brake lever.
  4. Apply a very thin film of silicone grease to the piston and drop it into the lever with the concave end facing out.
  5. Replace the pad contact adjust lever while gently holding the piston in with a tool.
  6. Fit the other pivot plate, with the hooked bottom, into place with the hooked bottom fitting around the pad contact adjust lever.
  7. Replace the T-shaped ball end shaft with a twisting motion that allows the end caps to it follows the ramps on the pivot plates.
  8. Partially insert the pivot pin into the lever.
  9. Fit the lever return spring between into the lever between the main lever blade and reach adjust.
  10. Align the pivot pin holes in the lever with the spring, with the lever pressing against the bushing on the T-shaped ball end shaft, and slide the pivot pin into place. (This was easiest when I guided the assembly together with a 3mm hex wrench.)
  11. Tighten the set screw to hold the pivot pin in place.
  12. Check that the lever moves and returns smoothly. Assess and fix if not.
  13. Turn the reach adjust for maximum reach. Reattach hose and bleed system.
Comments closed

Bypassing Reolink SSID Length Limitation

I purchased a Reolink E1 Zoom camera for occasional around the house use. It turns out that my SSID, Smart Meter Surveillance Network is too long for their setup app. While the standard is 32 octets (32 ASCII characters) — and my SSID is exactly this — some things, such as the Reolink app, only accept 31 characters. In this case it pulled the SSID from my phone (the network in use) and then truncated it. †

So, I set out to find a workaround, and I did.

During setup the Reolink app walks you through scanning a serial number QR code on the camera, prompts for the wireless network info, and then generates a QR code and displays it on the mobile device’s screen. The camera is then pointed at the screen, this QR code is read, and the camera configures its WiFi settings based on the code.

I figured that maybe if I generated a new QR code with the correct info I’d be able to configure the camera with a longer SSID and it turns out that worked.

After a couple minutes of generating codes I found the configuration QR code is text, formatted as follows, with #### as the last four characters of the camera’s serial number:

<QR><S>ssid</S><P>password</P><C>####</C></QR>

Using the first free online QR code generator I could find, I created a new QR code with containing the following text:

<QR><S>Smart Meter Surveillance Network</S><P>notmyrealpassword</P><C>M77L</C></QR>

I reset the camera, had it scan the new QR code, and it connected to the wireless network. It worked! The camera was now on the wireless network and I was able to connect to it in the app.

There did seem to be a bit of quirkyness in the app, possibly because of the long SSID. It’s working fine with the desktop app, so all is good. It’s also really nice to now have a way of reconfiguring the camera without having to install and use their app.

The standard maximum for SSIDs is 32 octets, or 32 ASCII characters. It appears some companies treat this as 31 characters, reserving the 32nd for the string termination character. Sort-of makes me wonder how I’ve been able to use this one for so long… It was fine with my old Apple AirPorts and I’ve had it running this way for couple years on Ubiquiti UniFi. Although it looks like the UniFi v6 UI now refuses to save changes with this SSID, so I guess I’m going to have to change it…

Comments closed

Easy Carpet Spikes for iMovR Freedom Base

I recently purchased an iMovR Energize corner standing desk which came with the Freedom base. It works well, but had a bit of a wobble when placed on the relatively-thick carpet in my office. Because the leveling legs are relatively wide (35mm) they’d sit on top of the carpet and the desk didn’t have great support.

To solve this I picked up four M8-1.25 x 25mm hex head screws from Home Depot and fitted them in place of the leveling feet. This resulted in ~20mm tall, narrow feet sticking down off the legs, pressing firmly through the carpet to the wood floor below, and no more wobble.

This is the same principle as carpet spikes, used to for speakers and other tall/narrow cabinets, to make them more stable on soft carpet by pressing through the carpet to the hard floor below. (Carpet spikes, for speakers, have all sorts of other acoustic isolating purposes which sometimes border on audiophile woo, but increased physical stability is an easily demonstrated effect.)

Comments closed