May '13 13

Serial via Network Bridge

I had a requirement for a Serial Bridge, eg: serial->Network->serial, I found a nice page with some options,  socat to be good enough for what I needed.

Server (Listening Side connected to end device)

socat -v -d -d tcp-l:54321,reuseaddr,fork file:/dev/ttyS0,nonblock,raw,echo=0,waitlock=/tmp/ttyS0.lock

Client (connecting to server)

socat -v -d -d tcp: file:/dev/ttyS0,nonblock,raw,echo=0,lockfile=/tmp/ttyS0.lock

Alternative using Virtual PTY and SSH remote exec

socat PTY,link=$HOME/dev/vmodem0,raw,echo=0,wait-slave EXEC:'"ssh socat - /dev/ttyS0,nonblock,raw,echo=0"'
Nov '12 08

BSOD analyze

I always forget how to get the driver info out of windbg

!analyze -v;r;kv;lmtn;lmtsmn;.bugcheck;!sysinfo cpuinfo;!sysinfo machineid; !sysinfo cpuspeed; !sysinfo smbios .logclose

If your getting errors about symbols, use !symfix remember to restart windbg afterwards.

Oct '12 03

Verify Linux MD device

Yet another faulty disk with bad blocks has me wondering how to check the MD array for consistancy, found a good post about it.

sudo bash -c "echo check >  /sys/block/md0/md/sync_action"
sudo bash -c "echo repair >/sys/block/md0/md/sync_action"
cat /sys/block/md1/md/mismatch_cnt
Apr '12 28

Slash Bash

Went for a Bash with Joffa today, nice jump, got some good air time. Joffa’s done a top job on the Vid as usual.

Apr '12 20

Packet dump on Cisco

Finally found a way to dump packets on a Cisco Router for tracing.

Router (config)# logging buffered 15000 (this creates a large enough buffer to look at locally on the router,or you can configure the router to log the ACL matches to a Syslog Server).
Router (config)# access-list 101 permit tcp any gt 0 any gt 0 log
Router (config)# access-list 101 permit udp any gt 0 any gt 0 log
Router (config)# access-list 101 permit icmp any any
Router (config)# access-list 101 permit ip any any log (this entry is a “catch-all”)
Router (config)# interface interfaceRouter (config-if)# ip access-group 101 in

Look at the log by using the show log command from the exec prompt. You should see IP addresses (source and destination), along with the used TCP or UDP ports (in parentheses):

One of the issues with the above is rate limiting on access-list’s, another way to trace packets is with debug, while this can be dangous, it can be usefull to. No need to use log in the access list.

config t
!disable CEF
no ip cef
int f0/1
!disable route cache
no ip route-cache
debug ip packet detail 101

Apr '12 13

MY Current RC’s

  • HobbyKing Clouds Fly, powered plane, 1300mm wingspan, good to learn on, easy to fly, and cheap. I’ve got a mini spy camera to fit to it with a transmitter and OSD (on screen display), once i’ve got it all fitted i’ll be able to view from the cockpit with on screen display for direction, heading, battery capacity etc.
  • DreamFlight Alula Glider, 900mm wingspan, Side Arm Launch it off a cliff and slope soar in the wind, great fun and relaxing, got some Video on / with it today (using my key chain spy camera)
  • Orange Tennis ball to give you some scale next to my Rock crawling tyres
  • Traxxas E-Maxx 4WD Monster Truck, custom painted boy (Wife painted, I Designed and masked it), its hard to see but there is a small Camera mounted inside this cab, I can put on some FatShark Goggles and view from inside the cabin. Currently Buster is Designing a new Body for this one, hope kids can paint it this weekend.
  • Traxxas Slash 4WD SCT (Short Course Truck), Custom painted Body (Designed by Beatle, Painted by the kids), Currently fitted with Road Tires and High speed pinion. When i went to Mums yesterday i got it up to 97kmh (60mph) I’m trying to get it over 100kmh, but it gets unstable over 80kmh and it wants to follow the camber in the road.
  • NQD Tear Into Jet Boat, Was a toy grade, but has had all the insides upgraded to Hobby grade, so instead of going 10kmh, it now goes about 60kmh, its also got water cooling fitted to the motor and speed controller.
  • Tamiya TT01D Drifter, custom painted body (Wife Painted, I designed), Drifting side ways on Concrete / Bitumen is just heaps of fun, has upgraded Motor and locked rear diff. Currently have a ‘ball diff.’ to put into the front differential.
  • HobbyKing mCX Micro Coaxial Helicopter, Just some fun flying indoor’s.
  • Losi 1/24 SCT, A Micro car for some indoor fun.
Mar '12 11

Teksumo flying wing

Ordered a new flying wing for myself, the Teksumo looks like it will be a good versatile wing, a bit cheaper than the Swift II, and easier to handle than the Ritewing Zephyr II.


Mar '12 06

Kerberos Auth in squid

Look like i’ll need to check out how to use kerberos auth in squid rather than ntlm

[2012/03/06 15:25:47.488709, 1] libsmb/ntlmssp.c:342(ntlmssp_update)
got NTLMSSP command 3, expected 1

“The “3” and “1” have been explained as the difference between NTLM vs Kerberos. 
As far as I can tell “3” means Kerberos is being used. “1” is NTLM. 
The ntlm_auth helper only checks NTLM and the squid_kerb_auth helper is needed instead for Kerberos. 
Looks to me like the client is broken and using Kerberos when offered NTLM as the only available auth option. “

Nice Article about Kerberos may help