Rawr!!!

[tutorial] Squid Proxy [with digest authentication]

Written by
October 7th, 2011

After posting a simple method of setting up squid proxy with basic authentication, I figured I’d post a little more secure method. The digest authentication procedure is simple, instead of transmitting your username/password in plaintext, you use an md5summed answer that protects your credentials. While some traffic could be sniffed (will address that with another post about ssl encrypting your squid proxy), your credentials will be safe. Anywho lets dive right in

  1. Install squid & continue to step 2
  2. Configure a new /etc/squid/squid.conf
    # Digest Squid Auth -- better method
    # /etc/squid/squid.conf
    #
    
    http_port 3129
    
    auth_param digest program /usr/lib/squid/digest_pw_auth -c /etc/squid/digest_passwd
    
    # Make /etc/squid/digest_password this way:
    ## First get a script...
    ## wget http://dl.dropbox.com/u/52078/digest_passwd.sh
    ## Execute something similar to the following
    ### sh ./digest_passwd.sh your_username_here your_password_here 'Squid proxy-caching web server' > /etc/squid/digest_passwd # need to execute as root/sudo
    ## This will give you a happy digest_passwd file
    
    auth_param digest children 5
    auth_param digest realm Squid proxy-caching web server
    auth_param digest nonce_garbage_interval 5 minutes
    auth_param digest nonce_max_duration 30 minutes
    auth_param digest nonce_max_count 50
    
    acl authenticated proxy_auth REQUIRED
    http_access allow authenticated
    
  3. Save the file, don’t forget to create /etc/squid/digest_passwd
    # Make /etc/squid/digest_password this way:
    ## First get a script...
    ## wget http://dl.dropbox.com/u/52078/digest_passwd.sh (contents below)
    ------
    #!/bin/sh
    
    user=$1
    pass=$2
    realm=$3
    
    if [ -z "$1" -o -z "$2" -o -z "$3" ] ; then
            echo "Usage: $0 user password 'realm'";
            exit 1
    fi
    
    ha1=$(echo -n "$user:$realm:$pass"|md5sum |cut -f1 -d' ')
    echo "$user:$realm:$ha1"
    ------
    ## Execute something similar to the following
    ### sh ./digest_passwd.sh your_username_here your_password_here 'Squid proxy-caching web server' > /etc/squid/digest_passwd # need to execute as root/sudo
    ## This will give you a happy digest_passwd file
    
  4. Startup squid, and enjoy a slightly more protected experience…

[tutorial] Setup your very own squid proxy [with basic authentication]

Written by
October 7th, 2011

So, after being trained in the dark arts of pentesting, hacking, and other nefarious computer skills; I suppose I should secure my webtraffic when out and about.  I know there are many ways to do this (ssh being one: http://fsk141.com/simple-socks-5-proxy-ssh-tunnel, but I figure setting up a proxy is one of the easiest things to access & use.

  1. Lets start by installing squid
    pacman -Sy squid #for Arch Linux -- use apt or whatever for other distros
    
  2. Then lets do a little configuration additions (make a new file /etc/squid/squid.conf):
    # Plaintext Authentication Squid Setup
    # /etc/squid/squid.conf
    #
    http_port 3129 #default port to connect with
    
    auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid/passwd # might need to change paths dependant on distro
    
    #make /etc/squid/passwd with the following:
    ## htpasswd /etc/squid/passwd your_username_here # execute as root/sudo
    
    auth_param basic children 5
    auth_param basic realm Squid proxy-caching web server
    auth_param basic credentialsttl 2 hours
    auth_param basic casesensitive off
    
    # acl allow rules
    acl authenticated proxy_auth REQUIRED
    http_access allow authenticated
    
  3. Save the file, and don’t forget to create /etc/squid/passwd
    htpasswd /etc/squid/passwd your_username_here # execute as root/sudo
    
  4. If everything is happy and giggly, then you can startup squid and have a ball browsing (sudo rc.d start squid)

Entering Walled Garden’s

Written by
September 16th, 2011

After visiting Alaska & Canada I have been wishing I was in the core USA more and more. Considering that in between Vancouver and Alaska internet is days apart, and that you have to pay for everything (and it’s not cheap). Well I’m way to cheap to pay for internet, and would rather just go without, but when in a pinch, and from boredom I figured out a simple way to get some free interwebs. Most of the Walled Garden’s (Open wireless connections that require you to login to use internet) are access controlled with MAC addresses, and as long as you can find an active (or recently active) user that paid for a connection, you’re in business. Depending on where you are, and how smart the network guru is it might be a little tricky to collect some MAC addresses. Here is what I tried, and have been very successfully sucking the teet of the internet and all it’s glorious power:   First I thought I would try a simple wireless scan, and find associated clients. Seems like a foolproof undetectable plan…


#Using my favorite tools part of the aircrack suite!

sudo airmon-ng start wlan0 #(wlan0 being your wireless interface)

sudo airodump-ng wlan0 #

This is an expected result. You’ll only get computers that are close to you, and aren’t necessary guaranteed reliable clients/MAC addresses.


CH  6 ][ BAT: 1 hour 55 mins ][ Elapsed: 0 s ][ 2011-09-16 23:40

BSSID              PWR  Beacons    #Data, #/s  CH  MB   ENC  CIPHER AUTH ESSID

00:22:6B:64:76:66  -82        3        1    0  11  54e  WPA  TKIP   PSK  SBW
00:25:9C:4D:4B:E8  -81        2        0    0  11  54e  OPN              linksys
00:1F:41:0F:C9:09  -76        2        1    0  11  54e. OPN              Connect_Here
00:1F:41:0F:EA:F9  -55        5        1    0  11  54e. OPN              Connect_Here
00:1F:41:0F:EB:09  -72        4        3    1   6  54e. OPN              Connect_Here

BSSID              STATION            PWR   Rate    Lost  Packets  Probes

00:1F:41:0F:C9:09  90:4C:E5:38:7C:6E   -1   12e- 0      0        1
00:1F:41:0F:EA:F9  90:84:0D:B3:D9:4A   -1   54e- 0      0        1
00:1F:41:10:C3:39  78:D6:F0:6C:A1:B3  -75    0 -24      0        1
(not associated)   00:1F:41:0F:EB:09  -70    0 - 2      0        3  Connect_Here

Well I didn’t really get any gold with the wireless approach, so I decided to do something a little more despicable, and invasive. Come to find out the network I was exploiting had a good network guru, and all internal port traffic was blocked. No matter, I was still able to scan & find some clients. (with a little tomfoolery)

I started with my most common nmap scan:

sudo nmap -A -T4 192.168.99.100-200 # (-A -T4 and the network I'm scanning)

That didn’t provide any results, so I had to get a little more creative. The network blocked ICMP pings, and a plethora of other nefarious traffic. So I started reading the man page on nmap, and found a line that gave me what I needed:

sudo nmap -A -T4 -Pn -S 192.168.99.4 192.168.99-102.100-200 -e wlan0 |grep MAC # (-A -T4 -Pn (ignore pings) -S 192.168.99.4 (spoof the source address -- I used the router as the spoof address) -- addresses I want to scan (their network wasn't separated via vlans, so I could scan internetwork) -e wlan0 (use wlan0 as scanning interface) | grep MAC (only give me the MAC addresses, I don't care about the rest)

This worked like a charm, and I was able to collect a wonderful bounty:

MAC Address: A4:67:06:71:37:60 (Unknown)
MAC Address: D8:9E:3F:34:A2:2F (Unknown)
MAC Address: 28:E7:CF:D2:C3:D5 (Unknown)
MAC Address: E8:06:88:48:58:CE (Apple )
MAC Address: B8:AC:6F:79:B5:8E (Dell)
MAC Address: 00:1E:4C:8E:AB:A6 (Hon Hai Precision Ind.Co.)
MAC Address: 18:F4:6A:B4:89:68 (Unknown)
MAC Address: 00:1C:23:A6:B0:AD (Dell)
MAC Address: 00:18:DE:98:60:AE (Intel)
MAC Address: 00:0E:35:4C:B4:4E (Intel)
MAC Address: 90:4C:E5:60:35:8A (Hon Hai Precision Ind. Co.)
MAC Address: 40:A6:D9:48:BF:71 (Unknown)
MAC Address: 00:1A:80:D6:61:6B (Sony)
MAC Address: 88:C6:63:52:CD:24 (Unknown)

Depending on how active the user was/is I’m easily able to change my mac address:

sudo macchanger -m A4:67:06:71:37:60 wlan0

And as long as it matched an authenticated user, hello internet, goodbye to $15 a day internet charges…

——

Things to consider are:
- If there is an active user, they might get warnings about a duplicate IP, since you are going to bind to their current IP address.

- Depending on the smartness/stupidness of the network professional that setup/maintains the network; you might be prone blocked from duplicate IP’s on a single MAC address.

- The network police could track you down, and make you pay (highly unlikely, but possible :)

Enjoy, and let me know if you have any success with my method, or if you have some tricks up your sleeves. I’ve yet to try NSTX or ICMPTX (IP over DNS, ICMP over DNS) but mean to eventually…

[Review] PC-Engines alix6e1

Written by
November 7th, 2010

set_logo

Product: alix6e1
Manufacturer: PC Engines
Price: $85.00 USD
Product Link: http://www.pcengines.ch/alix6e1.htm
Manual: http://www.pcengines.ch/pdf/alix2.pdf

Summary:

I can’t speak for everyone, but I’m very picky when it comes to hardware. I will normally research a new mainboard for quite some time, until I find just the right one. Then it comes, and I’m let down by some chipset issue, socket placement issue, or other nitpicks. These little issues end up swaying my “perfect” board into something sub-par by the time I go to use it in my projects. I think that too many manufacturers today try to please everyone & end up adding too much flac to their boards, until the hardcore enthuiasts are stuck with a bunch of crap that they don’t want/need. (Onboard video, extra pci-express slots, hdmi, onboard wifi???)

I’ve had the pleasure of using Alix boards in a few of my projects so far, and haven’t had the slightest regret to spending a little extra money to get something that is perfect. Pascal (main dude [and I think only dude] at PC engines) is a genius. He holds his place in a niche market, and does an amazing job at designing these boards. Just taking a visual look at the board you can see that everything is very well thought out. I dislike boards with large chunks of PCB that are left virtually untouched; due to poor overall design. The alix6e1 is no exception to all of the Alix boards in that they are very concentrated, and the components are splendidly placed. What makes the alix6e1 spectacular is that in the same form-factor of PC Engines other boards, so much is placed to fit in the board. You get a Wan/Lan port (2x 10/100), miniPCI card, miniPCI Express card, usb, cf card slot, 500 Mhz cpu, ram, and all the extra bits to make it work. This along with a great BIOS built from the ground up, makes this board difficult to pass up, especially since they are only $85.00 USD at the moment.

Specs:

  • CPU: 500 MHz AMD Geode LX800
  • DRAM: 256 MB DDR DRAM
  • Storage: CompactFlash socket
  • Power: DC jack or passive POE, min. 7V to max. 20V
  • Three front panel LEDs, pushbutton
  • Expansion: 1 miniPCI slot, 1 miniPCI Express slot (USB only), LPC bus
  • Connectivity: 2 Ethernet channels (Via VT6105M 10/100)
  • I/O: DB9 serial port, dual USB port
  • Board size: 6 x 6″ (152.4 x 152.4 mm)
  • Firmware: tinyBIOS

Hardware:

  • Case (case1c1blku):
  • case_front-tilt

    The case is absolutely splendid. Mind you it has a few “features” that some people might find unfavorable for their situation, yet everything is just perfect for me… I’d like to start with the most awesome part of this case; it’s utmost care to simplicity. I have dealt with a LOT of router cases in my time here on earth, and all of them seem to be overcomplicated (mostly plastic) pieces of crap. The case1c1blku is a no-hinge clam-shell design.

    case_open

    It’s takes 4 screws to mount the board, and another 4 to close the case up tight. The mounting anchor points are integrated in the case (soldered in), and seem very sturdy. I would have no regrets to throwing this router around in my bag as a mobile router due to the case ruggedness.

    case_mount

    The punch-outs on the back for the i/o ports are cleanly punched, and there are no barbs left behind (prolly laser cut).

    case_back

    To assemble:

    0) Add CF card now, unless you don’t plan on using one

    1) Remove the com port anchor screws

    2) Tilt board into case with i/o ports in their holes

    3) Bend the front a little till the board snugly fits in place

    4) Screw down & enjoy

    One of the “features” that some people might dislike is the non-removable CF card. I see this as a security feature, just in case you don’t want someone live-tampering with your device (if in a secure environment). Another “feature” of this is that the CF card doesn’t have the ability to move around (it’s stuck next to the front of the case). So if you’re especially rough with your alix6e1 you don’t have to worry about the card falling out.

    case_cf-card

  • Layout:
  • The overall use of space on this board is astounding. The CPU is butts up next to the memory, which allows for shorter traces. The Ethernet controllers are squished underneath the dead space for the miniPCI card. Even more space is saved with the heavy use of SMC’s (surface mounted components). Even the tolerances between components seem extreme (ceramic resistors next to clock chip (to the right of sim card slot)). It’s hard to find mistakes on this board, since everything is so well though out. The only pressing issue that I could find was a missing centimeter between the miniPCI & miniPCI Express card. If the miniPCI Express card was pushed to the left a little bit, or re-positioned; a normal sized pci card would fit more easily. I’ve been informed that this is planned for the next generation of this board, so at least it’s been noted and will be fixed.

    layout_top

    The bottom is just as pretty as the top. Many resistors, and a few smc’s are on the bottom, which makes me happy. It shows that a 2 layer design was implemented well. And based on how everything is neatly jammed into the board, the bottom compliments the top very well. It’s great to see a nice fat ground strip flowing throughout the core of the board (not a lot of backwards tracing to find a ground). And one last thing that I almost forgot to mention is a wonderful silkscreen that coincides with schematics on the site. If you are the tinkering type, and something happens to go horribly wrong; the ability to dive in, and find the problem yourself is simplified with technical documentation. The fact that Pascal releases his schematics is fantastic, and allows you to work on your hardware long after your warranty is up.

    layout_bottom

    The back of the board (the side with all the goodies) is fairly well thought out. I love that there are 2 usb ports, but a lot of dongles aren’t compatible with stacking that close. It would be great if there were two single usb ports (such as on either side of the wan port) But far enough so that if you have wide usb dongles it won’t interfere. I have a large collection of usb flash drives, and a bunch of them cut it close to interfering with the Ethernet port in the current configuration. Another awesome thing to have would be and integrated PSU (or an optional module). Where all you plugin is a short 2 prong cable. That would be a dream :)

    layout_ports

  • Input/Output:
  • Lets start with the basics: 10/100 Ethernet, Serial Port, miniPCI & miniPCI Express & sim card slot. Two Ethernet ports are more than enough for a 10/100 router. One WAN (who has 100Mb internet anyway ;) && one LAN (going to hook it up to a Gb switch anyway). The great thing about the 10/100 ports is that each has it’s own Via VT6105M chips. Instead of using a cludge multiplex hack, the time and effort was put in the use two individual chips. I’m glad that there is an external serial port (I don’t know how you could get away without having one), and it’s spaced far enough from the other i/o ports that makes it easy to plug in a larger serial adapter and still have room for an Ethernet jack. The biggest mistake of some boards is that serial jacks are put to close to other component jacks which disables you plugging in chunky cables. The miniPCI slot bummed me out. It’s just a little too close (about .5mm) to the miniPCI Express card slot which disables you from using full size miniPCI cards. You can still use full size miniPCI cards, but they will bow a little bit from hitting the top of the miniPCI Express connector. I tried to get a good picture, but couldn’t get a good angle, sorry. I never like to bend boards, or force anything, but it is a very minor bend. In the long run if you ran a full sized miniPCI card; you wouldn’t have any issues, it’s just not perfect. The miniPCI Express slot is a minor letdown; in that it only supports usb miniPCI Express cards. (kinda hit/miss if your card is usb or native minipci express). You would have to look very closely at the documentation of the card you are planning to purchase to make sure that it’s a usb card & not native. And most of the time there isn’t sufficient documentation :( I didn’t have a sim card to test the sim card slot with (since I use verizon (cdma)), but I can’t see it being hard to recognize/setup.

    Lets finish off I/O with usb, power, cf card, and optional ports… I kinda wish that the usb were oriented a little differently to accommodate more usb options. In the current configuration you are allowed two thin usb devices. It would be nice if the usb ports were oriented differently to allow more variation with usb dongles. The cf card slot is perfectly placed & it’s horribly placed (depending how you look at things) For one it’s secure. To access the card you have to open the case, pull up the mainboard & only then can you remove/replace the cf card. On the other hand if your a hacker that wants to constantly change/hack & break your router OS & swap out cf cards; you’ll have no luck with the current configuration. The one last dream of this board would be to have the included optional components well not optional. The internal mini-ide port would be killer for a little extra storage, and internal usb would be spectacular for a nice little flash drive that doesn’t stick out the back of the device. I know they are optional for a reason, but I wish the reason was NULL & they were included ;)

  • Power Consumption:
  • I’m using a 12V 1A PSU brick & am consuming on average 6watts. I could probably optimize OpenWRT to save a half or maybe even a full watt, but for now I’m fine with 6 watts.

  • Benchmarks:
  • I’ve been working on true benchmarks for a while now, and am going to outline everything in another post with OpenWRT due to so much entanglement with the OS. The quick benchmark is what you would expect from a 10/100 Ethernet connection (not any faster or slower) && the processor is quick & performs VERY well for the application. Everything is robust, yet power efficient & cool. No fans are needed whatsoever even with full load; since the CPU & accompanying chips are cool to touch & don’t overheat.

Software:

  • BIOS:
  • The BIOS is streamlined, and non-cluttered. It’s a perfect fit to the overall design of the board. It was built from the ground up for the alix board series. A quick attachment via usb serial converter && a `screen /dev/cu.usbserial 38400` (default baud rate) gave me the goods I was looking for.

    A little run down on what’s shown on bootup:

    1) BIOS version (this is the newest for the board)

    2) Base Memory

    3) Extended Memory (aka. usable memory)

    *) All the rest is initiated by hitting the letter ‘s’ on your keyboard (to startup the config menu)

    - The menu allows you to change the baud rate (beware that some baud rates aren’t supported by grub/custom router OS’s)

    - CF card mode modification

    - MFGPT workaround (timer hack)

    - late PCI init (fix for lousy pci cards)

    - enable/disable serial console

    - PXE (pixie boot is so 1337)

    - xmodem (upload binary [usually used to flash bios])

    – More information can be found in the manual (http://www.pcengines.ch/pdf/alix2.pdf)

    <br />
    PC Engines ALIX.2 v0.99h<br />
    640 KB Base Memory<br />
    261120 KB Extended Memory</p>
    <p>01F0 Master 848A SAMSUNG CF/ATA<br />
    Phys C/H/S 4065/16/63 Log C/H/S 1016/64/63</p>
    <p>BIOS setup:</p>
    <p>(9) 9600 baud (2) 19200 baud *3* 38400 baud (5) 57600 baud (1) 115200 baud<br />
    *C* CHS mode (L) LBA mode (W) HDD wait (V) HDD slave (U) UDMA enable<br />
    (M) MFGPT workaround<br />
    (P) late PCI init<br />
    *R* Serial console enable<br />
    (E) PXE boot enable<br />
    (X) Xmodem upload<br />
    (Q) Quit<br />
    
  • Choice of Router OS:
  • I choose OpenWrt for now. I’ve been using dd-wrt on my wrt-350n for the longest time, and would like a change of scenery. Especially since there are a few really stupid quirks to dd-wrt that bug me. (Like why the hell isn’t IPv6 support compiled in :( ) The installation went flawlessly. I just `dd if=openwrt-x86-generic-combined-ext2.img of =/dev/disk3` (something like that on my mac), and started up the board, and bingo, everything was ready to go. The BIOS had no issues with my CF card, and OpenWrt has amazing support for the alix boards (x86 version of OpenWrt). I’ve been running it for a while, and it’s been chugging along with no issues. I plan to have an OpenWrt tutorial in the future, so I won’t go into much detail about OpenWrt, but expect more in the future.

Summary:

Other than a couple little quirks (usb only miniPCI Express ; miniPCI -> miniPCI Express gap & cf card spacing) this board is fantastic. It draws very little power, is powerful, and runs cool & quiet (well silent). The case is a simple clamshell that is easy to assemble, and feels very sturdy. The BIOS rocks with a perfect amount of features. The overall potential for this board is amazing (diy mifi device); I’m sad that I won’t be taking full advantage of the mini-pci express slot; since I use my Droid Incredible for a mobile hotspot. I guess the one and only big letdown for me is limited support for mini pci-express slot. Since it only allows usb cards (a couple gobi devices, novatel, and some others) you are forced to purchase a mini-pci card for wireless. It would be wonderful to be able to choose between mini-pci && mini pci-express in the future since mini pci-express cards are more widely available & cheaper. I would & do recommend this board to any diy hobbyist that want’s a great board, for cheap, with plenty of features to chew on.

[PotW] bwm-hg

Written by
October 26th, 2010

little-throughput

I was pressed to figure out how much throughput was going over an interface for my laptop; a few minutes later I found this gem! It has one purpose, and it does it exceptionally well! Well I lie, it has a few purposes, but it’s main goal (and title) is to monitor bandwith [Band With Monitor - Next Generation]. Why would I want to monitor my bandwidth? Well for this usage case I wanted a simple method to view what kind of nfs throughput I was getting on my laptop. Bingo, I spent a little over a millisecond installing bwm-ng && was very happy to see exactly what I was looking for without having to do any special flags, or configuring the program, or anything. I quickly hit the ‘h’ to get a few little tidbits of greatness; like how to change the probe timeout, and other magical things. I love this little program and use it on all my machines now for quick throughput monitoring on my network/disks (ya, it does disks too ;)

Program: bwm-ng

Site Link: http://www.gropp.org/?id=projects&sub=bwm-ng

Download:

  1. Download direct: http://www.gropp.org/bwm-ng/bwm-ng-0.6.tar.gz
  2. Use CVS & get the newest version: svn co https://svn.sourceforge.net/svnroot/bwmng/trunk bwm-ng

Installation:

  1. Use your package manager (pacman -S bwm-ng for archlinux)
  2. Mac (download homebrew && sudo brew install tmux)
  3. Compile manually >>

Compile:


./configure

make -j8 (make with 8 jobs at once [compile faster on a core duo])

sudo make install

How to use:

First off execute `bwm-ng`, you will be greeted with your active interfaces. Shown will be TX (Transmit), RX (Receive) & Total && Total (of everything).

mac-ethernet

Right from the get go I hit the ‘h’ key for help, and quickly got acquainted with some powerful letters. ‘d’, ‘u’, ‘n’, ‘t’ are my favs *and are the heart of the application. I started out by changing the default value shown to “auto” with ‘d’, then I changed the type of output to “average” with the letter ‘t’. I was tickled pink that in less than 5 minutes I had what I needed, with no hassle what-so-ever. Some other glorious things that this program does is allow you to select how you would like to output the data (ncurses, ncurses2 (colors & stuff), plain (text), and html).

All of these features also apply to monitoring disks as well. Just punch the ‘n’ key a few times until disks show up…

If I haven’t expressed it already, I really like this program, and it’s one of the ones that I’ll be using regularly from now on (Until I find something better :)
Keybindings:


'h'  show this help
 'q'  exit
 '+'  increases timeout by 100ms
 '-'  decreases timeout by 100ms
 'd'  switch KB and auto assign Byte/KB/MB/GB
 'a'  cycle: show all interfaces, only those which are up,
only up and not hidden
 's'  sum hidden ifaces to total aswell or not
 'n'  cycle: input methods
'u'  cycle: bytes,bits,packets,errors
 't'  cycle: current rate, max, sum since start, average for last 30s

–help:

<strong>
</strong>

bwm-ng --help
Bandwidth Monitor NG (bwm-ng) v0.6
Copyright (C) 2004-2007 Volker Gropp <bwmng@gropp.org>
USAGE: bwm-ng [OPTION] ... [CONFIGFILE]
displays current ethernet interfaces stats

Options:
 -t, --timeout <msec>    displays stats every <msec> (1msec = 1/1000sec)
 default: 500
 -d, --dynamic [value]   show values dynamicly (Byte KB or MB)
 -a, --allif [mode]      where mode is one of:
 0=show only up (and selected) interfaces
 1=show all up interfaces (default)
 2=show all and down interfaces
 -I, --interfaces <list> show only interfaces in <list> (comma seperated), or
 if list is prefaced with % show all but interfaces
 in list
 -S, --sumhidden [value] count hidden interfaces for total
 -A, --avglength <sec>   sets the span of average stats (Default 30s)
 -D, --daemon [value]    fork into background and daemonize
 -h, --help              displays this help
 -V, --version           print version info

Input:
 -i, --input <method>    input method, one of: getifaddrs sysctl netstat ioservice

Output:
 -o, --output <method>   output method, one of:
 plain, curses, curses2, csv, html
 -u, --unit <value>      unit to show. one of bytes, bits, packets, errors
 -T, --type <value>      type of stats. one of rate, max, sum, avg
 -C, --csvchar <char>    delimiter for csv
 -F, --outfile <file>    output file for csv and html (default stdout)
 -R, --htmlrefresh <num> meta refresh for html output
 -H, --htmlheader        show <html> and <meta> frame for html output
 -c, --count <num>       number of query/output for plain & csv
 -N, --ansiout           disable ansi codes for plain output
 (ie 1 for one single output)

Floating in numbers [IPv6] | Moved to FreeDNS

Written by
February 26th, 2010

I went to SCaLE last weekend, and was very happy to talk to the people at the IPv6 booth. I also jacked one of their “getipv6.info” stickers cause it looked neato & unixy. A day later I stuck it on my laptop (along with some other nice linux/gnu/openvz buddies); and a day after that I started on my journey to IPv6.
I’ve been working through IPv6 Essentials in my free time, and actually implementing it at home! I started out by bricking my router (earlier post), followed by epic failure when trying to configure IPv6 on my router. I was rewarded with a little success before I had to call it quits late at night. I manually assigned my IPv6 address to my mac and everything worked wonderfully (ipv6.google.com for example)

Well I was dis-satisfied, and spent the better part of my day at home (Thursday 25, 2010) getting it to work on my router. Now everything works & I can reboot my router & expect everything to come back when it’s back up. I will post how I got everything working ASAP since the current IPv6 articles are dated & chock full of mis-information.
In the process of moving to IPv6 at home I needed to make my dyndns IPv6 compatible. Well dyndns isn’t IPv6 compatible (for free anyways), so I decided to switch to FreeDNS. It provides AAAA record support (IPv6), and allowed me to pass onto the next level of the HE.net certification:


Yay! I’m an IPv6 Enthusiast…
After reading through IPv6 Essentials I can see the real plusses to IPv6, and can’t wait to take advantage of all it’s neat features.

Gani Network Driver

Written by
November 22nd, 2009

Earlier today I came across a giant snag with my new NAS. After about 3GB of network throughput (under high load), the network stack would quit, and meh…
So I went to my trusty friend Google (how did people ever live without this), and ended up finding out that Masayuki Murayama’s ‘gani’ driver works great, and have had my network at heavy load for the past 6 or so hours with no problems what-so-ever…

You can get all his drivers here: http://homepage2.nifty.com/mrym3/taiyodo/eng/

This is a valuable link, I have used his drivers before for my first board in this ever stressful NAS setup. Anywho the install was very straightforward (make, make install, reboot), and everything is working wonderfully ever since.

Simple Socks 5 proxy [SSH tunnel]

Written by
January 21st, 2009

Need a simple haxie to tunnel your computer traffic? Use an SSH tunnel; it’s simple and painless.

What you need:
Server
-SSH

Client
-SSH
-Web Browser (Firefox + FoxyProxy [What I use])
-Any other application that allows Socks 5 proxy

Procedure:

Open up a terminal and type the following:

~ ssh fsk141@fsk.tld -ND 1337

Description:
Use SSH to tunnel all of your traffic through port 1337

- ssh (Secure Shell)
- fsk141@fsk141.tld (user:host)
- -ND (look below for man page)
- 1337 (port number)

Man page entries for -N -D

       -D [bind_address:] port
              Specifies a local ‘‘dynamic'' application-level port forwarding.  This works by allocating a socket to listen to port on the local side, optionally
              bound  to  the  specified  bind_address.   Whenever a connection is made to this port, the connection is forwarded over the secure channel, and the
              application protocol is then used to determine where to connect to from the remote machine.  Currently the SOCKS4 and  SOCKS5  protocols  are  sup?
              ported, and ssh will act as a SOCKS server.  Only root can forward privileged ports.  Dynamic port forwardings can also be specified in the config?
              uration file.

              IPv6 addresses can be specified with an alternative syntax:
               [bind_address/] port or by enclosing the address in square brackets.  Only the superuser can forward privileged ports.  By default, the local port
              is  bound in accordance with the GatewayPorts setting.  However, an explicit bind_address may be used to bind the connection to a specific address.
              The bind_address of ‘‘localhost'' indicates that the listening port be bound for local use only, while an empty address or ‘*' indicates  that  the
              port should be available from all interfaces.

        -N     Do not execute a remote command.  This is useful for just forwarding ports (protocol version 2 only).

Now that you’re connected you can jump over to firefox:

Preferences > Advanced > Settings

Just input the pertinent information (localhost:1337) and make sure socks5 is bubbled… That’s it… It’s a very simple process, and is very handy when you need to access a blocked site, or protect valuable information.