ict.ken.be

Delivering solid user friendly software solutions since the dawn of time.

Running dd-wrt on a Linksys WRT160N 

Categories: Network

Linksys WRT160N and power adaptor Status page of dd-wrt

The Linksys WRT160N is a nice router, I bought it years ago and it served me for a long time. 

Recently I had to discard it because wifi protected setup (wps) has become vulnerable and linksys does not release new firmware for the device. Not to mention that they actually removed the source from their GPL Opensource Center.

So I decided to flash dd-wrt on it for using it internally.

Figure out correct version:

  • WRT160N with firmware v1.53.0 from 19 dec 2007
  • This is a version 1, at this time version 2 is NOT supported by dd-wrt
  • Supports 2,4Ghz has 16MB of ram and 4MB of flash memory
  • Default password is admin with a blank username

Get latest correct binary:

Flash the firmware:

  • Connect RJ45 cable between router and computer.
  • Disable all other network adaptors of computer.
  • Disable all firewalls and antivirus of computer.
  • Set static ip for the computer. eg. 192.168.1.100
  • Do a 30/30/30 reset (with power on press reset button for 30s, unplug power for 30s, keep another 30s for a total of 90s pressing the reset button) and wait at least 3 minutes.
  • Browse to 192.168.1.1 and check if default password.
  • Do a 30/30/30 reset and wait at least 3 minutes.
  • Clear browser cache and goto 192.168.1.1
  • Administration > Firmware Upgrade
  • Upload binary > Flash
  • Wait at least 3 additional minutes (even if you get success from browser)
  • Do a power cycle (30s unplugging the power of router)
  • Wait at least 3 minutes
  • Clear browser cache and goto 192.168.1.1
  • You should see the dd-wrt.
  • Do a 30/30/30 reset and wait at least 3 minutes.
  • Clear browser cache and goto 192.168.1.1
  • Setup new password and configure the router
  • Put computer back on dynamic ip
  • And remember your antivirus and so :)

 Development and sources:

Restore mssql database checklist 

Categories: SQL Server

using SQL Server Management Studio

Create new database:

  • Databases > Right click > New database
  • General > Databasename
  • General > Databasefiles > Change path
  • OK

Restore backup:

  • Select Database > Right click > Tasks > Restore > Database
  • General > Device > Browse for .bak
  • General > Destination > Select database !
  • Options > Overwrite with replace
  • OK

Asus eee PC as router 

Categories: Linux Network

A white Asus eee PCBurning linux penguin

I still had a small Asus eee Pc, so I decided to turn it into a router I can take with when I travel. I could have installed a full distro on it, but decided to go for one of the prebuild firewall distros. I installed monowall and saw that it was actually not really using the little pc, so I replaced it with ipfire because it allows you install additional packages for file and printer sharing and you switch samba on if needed.

Since the Asus eee Pc has only one wired nic and one wireless adapter, there are some little tricks to remember...

  • Download ipfire cd-rom iso and use Yumi to put it on a usb stick.
  • Press escape on boot to select usb.
  • Internet modem cable goes into red.
  • Wifi will become green. (as opposed to the usual blue)
  • After reboot login to shell as root
  • ifconfig (to check if you got ip from isp)
  • pakfire list (will show all the addons available for ipfire)
  • pakfire install hostapd (turns wifi adaptor into access point)
  • pakfire install elinks
  • elinks (use elinks at 192.168.1.1:444 to configure wifi)

The tricky part is using elinks text browser, it feels so 1985. Remeber that after selecting the information is at the bottom of the console. You also have to press enter to type into an input field, but should use the arrows to exit the field.

After you enable the wifi (menu > ipfire > WLanAP), you could use the default ssid (ipfire) and password (IPFire-v2.x) to re-configure on another client with the web interface.

other links:

Checklist for new nuget creation 

Categories: .Net

We use this checklist whenever we need to setup a new nuget package, that way it will include tests, coverage, labelling and deployment.

  • Create repository on server: hg init c:\Respository\Nugets\ken.X
  • Clone repository to local machine using TortoiseHg
  • Create new Project: Templates - Windows - Class Library - Create directory for Solution - ken.X
  • Close solution and move everything up one directory (cause of clone) - ken.X.sln
  • Add ken.Tools nuget package to solution
  • Create default hg ignore file with *.suo *.user bin debug packages/ tools/
  • Add new Class Library Project for testing: ken.X.Tests + add ken.XUnit
  • Solution - Configuration Manager - New - 'Publish' copy from Release and create project configurations
  • Update so output directory for Publish is release folder in ken.X.csproj
  • Update so output directory for Publish is release folder in ken.X.Tests.csproj
  • Add Import Project for build.config in ken.X.Tests.csproj (<Import Project="..\tools\build.config" />)
  • Update assembly information for ken.X.Tests
  • Update assembly information for ken.X and add InternalsVisible for ken.X.Tests
  • Add nuspec file to ken.X
  • Rebuild the test project with publish configuration to deploy the nuget.

Fiddler shortcut key to copy request to composer 

Categories: Network

To edit and reissue a request you can drag and drop it to the composer, but I couldn't find the shortcut key for this.

Steps to add this functionality behind the 'X' key:
(edit: changed this to X because the new fiddler uses E for breakpoints)

  • Ctrl + r to open fiddler script
  • In OnBoot() add: 
    FiddlerApplication.UI.lvSessions.add_KeyDown(HandleAKey);
  • After this method add: 
    static function HandleAKey(Sender, theKey:KeyEventArgs) { 
        if (theKey.KeyData == Keys.X)
        {
               var oS: Session = FiddlerApplication.UI.GetFirstSelectedSession();
               if (null == oS) return;
               theKey.Handled = theKey.SuppressKeyPress = true;
               FiddlerApplication.DoComposeByCloning(oS);
        }
    }
  • Restart fiddler
Page 10 of 40 << < 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 20 > >>