From c289df71d7da79bee658580a75d23626bd74ec5e Mon Sep 17 00:00:00 2001 From: Markus Birth Date: Fri, 16 May 2014 09:51:37 +0200 Subject: [PATCH] Added tags to posts, also copied static pages as blog posts (testing). --- _posts/2009-02-02-asus-wl300g.md | 43 +++++++++ _posts/2009-12-19-avm-fritzbox-7270.md | 115 +++++++++++++++++++++++++ know-how/hacking/asus-wl300g.md | 14 ++- know-how/hacking/avm-fritzbox-7270.md | 12 ++- 4 files changed, 180 insertions(+), 4 deletions(-) create mode 100644 _posts/2009-02-02-asus-wl300g.md create mode 100644 _posts/2009-12-19-avm-fritzbox-7270.md diff --git a/_posts/2009-02-02-asus-wl300g.md b/_posts/2009-02-02-asus-wl300g.md new file mode 100644 index 0000000..7552f53 --- /dev/null +++ b/_posts/2009-02-02-asus-wl300g.md @@ -0,0 +1,43 @@ +--- +title: ASUS WL-300g +layout: default +created: 2009-02-02 23:18:42 +0100 +toc: true +tags: + - know-how + - hacking + - hardware + - wifi + - asus + - firmware +--- +Install DD-WRT +============== + +**Download:** [dd-wrt.com](http://www.dd-wrt.com/dd-wrtv2/down.php?path=downloads%2Fv24-sp1%2FConsumer%2FAsus%2FWL300g/) + + +Patching firmware +----------------- + +Older versions of DD-WRT didn't provide a firmware file for the WL-300g, but only for the WL-500gx. So I had to patch it for the WL-300g to accept. + +The router ID was found quick: In the `dd-wrt.v23_asus.trx` at `0x356fc4`, there's the string + +``` +57 4c 35 30 30 67 78 +``` + +which is `WL500gx`. After changing it to `WL300g ` (with a space after the "g" to fill up the digit), the router didn't reject the firmware directly, but initiated the update, then rebooted quickly after that and showed the old firmware again. + +According to the [DD-WRT manual for the WL-500g](http://www.dd-wrt.com/wiki/index.php/Installation#Asus_WL500G.28Original.29), the router should have a recovery mode which you can enable by holding the Reset button while powering on the device. But seems this mode wasn't there in my router. + +So there has to be some sort of checksum which tells the router whether the firmware file is corrupt or not. In the DD-WRT forums I read somewhere, that there are only some informational bytes different between a normal DD-WRT binary firmware and the ASUS TRX format - maybe the ID-string at the end. + +Therefore I compared the two files `dd-wrt.v23_asus.trx` and `dd-wrt.v23_generic.bin` and voilà: Besides the few bytes at the end of the file, there were 4 additional bytes different at position `0x08`. This HAD to be the checksum. The remaining question was, from which bytes it was calculated. Since the seemingly compressed data began at `0x28`, I tried from there to the end and used [Hex-Workshop](http://www.hexworkshop.com/) to calculate different checksums, but nothing matched what was in these 4 bytes. The next try was from `0x10` but also no match. Then I tried starting directly after the checksum in the header, from `0x0c` and bang: The CRC32 checksum matched that in the header. + +![Hex Workshop Screenshot](hexworks.png) + +So I calculated the CRC32 of my modified file and changed the header - and now I could upload the DD-WRT file using the normal firmware upgrade of the original firmware. After installing v23, you can easily update to v24 using the DD-WRT web interface. + +![DD-WRT Version Info](ddwrt.png) diff --git a/_posts/2009-12-19-avm-fritzbox-7270.md b/_posts/2009-12-19-avm-fritzbox-7270.md new file mode 100644 index 0000000..a8e9db9 --- /dev/null +++ b/_posts/2009-12-19-avm-fritzbox-7270.md @@ -0,0 +1,115 @@ +--- +title: AVM Fritz!Box 7270 +layout: default +created: 2009-12-19 18:40:34 +0100 +toc: true +tags: + - know-how + - hacking + - hardware + - avm + - fritz + - fritzbox + - settings +--- +**Homepage:** http://www.avm.de/de/Produkte/FRITZBox/FRITZ_Box_Fon_WLAN_7270/index.php + +Fritz Fun +========= + +If you want to receive facsimilies (fax) via your Fritz!Box, you can do that via the internal fax receiver. If you want to **send** faxes from Ubuntu, you can install the [ffgtk](http://wiki.ubuntuusers.de/ffgtk)-package. The original homepage of the project is [tabos.org](http://www.tabos.org/ffgtk/). With it installed, you will get a new "Fax" printer to send faxes and it can also receive faxes directly to your PC. + + +VPN +=== + +You can set up your FB to accept VPN connections. As a client, you can use the free [Shrew Soft VPN Client](http://www.shrew.net/). How to set up the client is explained in the [AVM VPN portal](http://www.avm.de/de/Service/Service-Portale/Service-Portal/index.php?portal=VPN) (see bottom right box). + + +Static DHCP +=========== + +The FB only supports "static DHCP" in the way that you can mark devices so that they keep their currently (via DHCP) assigned IP address. You can not manually set the IP address you want. + +So you could now go the easy way and enable *Telnet access* to the device and change the DHCP table directly. But this way you won't get any support from AVM and also you will get a nasty warning message in the web interface. + +Another way is to export the configuration and change the entries there. If you know how to update the checksum, you can use any text editor program. But if you just want to make a few changes without learning how to calculate the checksum, there's a Java program called [FBEditor](http://www.ip-phone-forum.de/showthread.php?t=79513). + +Just download it, enter the IP and password of your FB and there you go. Any changes you make inside the program will automatically update the checksum so that the FB will accept your changes. + +So now it's easy to change the `dhcpserver` ⇒ `statics` section or the `landevices` ⇒ `landevices`. + +

If you make any changes to the Network settings in the web interface, the changes you made by editing the file will probably be deleted. At least if the third byte of an IP address doesn't match the FB's one. (e.g. if you have a class B network)

+ + +Generate static DHCP configuration from a file +---------------------------------------------- + +If you have several devices in your home network and the FB keeps deleting them from their settings, you can create a file with all your devices and generate the appropiate FB settings from it. + +So first, create a file `static.list` which looks like this (fill in the data of your own hosts): + +``` +00:21:85:C0:FF:EE mypc 172.16.1.1 +00:16:D4:C0:FF:EE wife-pc 172.16.1.2 +00:18:39:C0:FF:EE slug 172.16.254.253 +00:25:00:C0:FF:EE iphone 172.16.1.10 +00:1E:A9:C0:FF:EE wii 172.16.1.11 +00:22:69:C0:FF:EE netbook 172.16.1.3 +00:C0:EB:C0:FF:EE printsvr 172.16.254.252 +``` + +Then you only need this little Python script (and *[Python](http://www.python.org/)*, of course): + +```python +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +__author__ = "mbirth" +__date__ = "$2009-12-19 17:37:38$" + +f = open( "static.list", "rt" ) +entries = [] +for line in f: + line = line.strip(" \n") + ( mac, sep, post ) = line.partition(' ') + post = post.strip() + ( host, sep, ip ) = post.partition(' ') + ip = ip.strip() + entries.append( ( mac, host, ip ) ) + +print( "%i hosts found." % len( entries ) ) + +statics = " statics" +for entry in entries: + statics += " {\n" + statics += " macaddr = " + entry[0] + ";\n" + statics += " ipaddr = " + entry[2] + ";\n" + statics += " }" + +print( "#### dhcpserver > statics" ) +print( statics ) + + +landevs = " landevices" +for entry in entries: + landevs += " {\n" + landevs += " ip = " + entry[2] + ";\n" + landevs += " name = \"" + entry[1] + "\";\n" + landevs += " mac = " + entry[0] + ";\n" + landevs += " medium = medium_ethernet;\n" + landevs += " }" + +print( "#### landevices > landevices" ) +print( landevs ) +``` + +Custom DNS +========== + +To use custom DNS entries instead of those given by your ISP, use the [FBEditor](http://www.ip-phone-forum.de/showthread.php?t=79513) and find the entries + + overwrite_dns1 = 0.0.0.0; + overwrite_dns2 = 0.0.0.0; + +Now just insert your desired DNS servers, upload the changed config and you should be set. (Info found on [ip-phone-forum.de](http://www.ip-phone-forum.de/showthread.php?t=86191&page=2).) diff --git a/know-how/hacking/asus-wl300g.md b/know-how/hacking/asus-wl300g.md index 4ec9fdf..7552f53 100644 --- a/know-how/hacking/asus-wl300g.md +++ b/know-how/hacking/asus-wl300g.md @@ -3,12 +3,22 @@ title: ASUS WL-300g layout: default created: 2009-02-02 23:18:42 +0100 toc: true +tags: + - know-how + - hacking + - hardware + - wifi + - asus + - firmware --- -# Install DD-WRT +Install DD-WRT +============== **Download:** [dd-wrt.com](http://www.dd-wrt.com/dd-wrtv2/down.php?path=downloads%2Fv24-sp1%2FConsumer%2FAsus%2FWL300g/) -## Patching firmware + +Patching firmware +----------------- Older versions of DD-WRT didn't provide a firmware file for the WL-300g, but only for the WL-500gx. So I had to patch it for the WL-300g to accept. diff --git a/know-how/hacking/avm-fritzbox-7270.md b/know-how/hacking/avm-fritzbox-7270.md index ff09fcf..a8e9db9 100644 --- a/know-how/hacking/avm-fritzbox-7270.md +++ b/know-how/hacking/avm-fritzbox-7270.md @@ -3,6 +3,14 @@ title: AVM Fritz!Box 7270 layout: default created: 2009-12-19 18:40:34 +0100 toc: true +tags: + - know-how + - hacking + - hardware + - avm + - fritz + - fritzbox + - settings --- **Homepage:** http://www.avm.de/de/Produkte/FRITZBox/FRITZ_Box_Fon_WLAN_7270/index.php @@ -29,9 +37,9 @@ Another way is to export the configuration and change the entries there. If you Just download it, enter the IP and password of your FB and there you go. Any changes you make inside the program will automatically update the checksum so that the FB will accept your changes. -So now it's easy to change the `dhcpserver` => `statics` section or the `landevices` => `landevices`. +So now it's easy to change the `dhcpserver` ⇒ `statics` section or the `landevices` ⇒ `landevices`. -If you make any changes to the *Network* settings in the web interface, the changes you made by editing the file will probably be deleted. At least if the third byte of an IP address doesn't match the FB's one. (e.g. if you have a class B network) +

If you make any changes to the Network settings in the web interface, the changes you made by editing the file will probably be deleted. At least if the third byte of an IP address doesn't match the FB's one. (e.g. if you have a class B network)

Generate static DHCP configuration from a file