<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" >

<channel>
	<title>evilgenius &#187; kthxbye</title>
	<atom:link href="http://www.evilgenius.de/category/kthxbye/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.evilgenius.de</link>
	<description>wired? no, weird wireless!</description>
	<lastBuildDate>Sun, 12 Jul 2009 15:50:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Configuring your DSL modem through your router</title>
		<link>http://www.evilgenius.de/2008/10/09/configuring-your-dsl-modem-through-your-router/</link>
		<comments>http://www.evilgenius.de/2008/10/09/configuring-your-dsl-modem-through-your-router/#comments</comments>
		<pubDate>Thu, 09 Oct 2008 21:38:42 +0000</pubDate>
		<dc:creator>hosh</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[kthxbye]]></category>

		<guid isPermaLink="false">http://www.evilgenius.de/?p=104</guid>
		<description><![CDATA[I unplugged my modem last week before I went to Dortmund for some days and plugged it back in last Sunday when I came back. Since then my DSL broadband access is pretty slow. Like 1 Mbit/s downstream, should be around 16 Mbit/s. Therefore I messed a little bit around with my configuration and found [...]]]></description>
			<content:encoded><![CDATA[<p>I unplugged my modem last week before I went to Dortmund for some days and plugged it back in last Sunday when I came back. Since then my DSL broadband access is pretty slow. Like 1 Mbit/s downstream, should be around 16 Mbit/s. Therefore I messed a little bit around with my configuration and found out that my DSL Modem &#8211; <em>Siemens C2-010-I</em>, is actually <a href="http://www.asiacom.com.cn/UploadFiles/File/system/200806/2007110_11-32-29.pdf">Viking II Plus</a> and not a modem but a moden/router/bridge. My provider configured the Viking as a bridge, therefore it looked like a usual DSL modem.</p>
<p><span id="more-104"></span></p>
<p>Basically you just have to configure your interface on your PC to have the IP-Address <code>192.168.1.2</code> (or any other address within <code>192.168.1.0/24</code>) and then you either can access the Viking&#8217;s HTTP or telnet server via <code>192.168.1.1</code>.</p>
<p>With the web interface running on the HTTP server you can configure basic things like switching your bridging modem into a router. The basic configurations options you have for every DSL router. Anyway more interesting is the telnet interface. With the help of it you can get many more informations about your DSL connection. I found a preliminary command reference for the Viking chip set family which seems to contains many commands you can use to get some more informations out of your modem/router/bridge.</p>
<p><code><br />
martin@kovalski:~$ telnet 192.168.1.1<br />
Trying 192.168.1.1...<br />
Connected to 192.168.1.1.<br />
Escape character is '^]'.</p>
<p>                         ******************<br />
                               Welcome<br />
                         ******************</p>
<p>Software Release R100B01.0B_HN_20060406<br />
Copyright (c) 2001-2004</p>
<p>login: alice@13184<br />
password:<br />
Login Successful<br />
$help<br />
Command        Description<br />
-------        -----------<br />
alias          To Alias a command<br />
apply          Apply configuration/image file<br />
commit         Commit the active config to the flash<br />
create         Create a new entry of specified type<br />
delete         Delete the specified entry<br />
download       Download a file on to the Device<br />
exit           To exit the CLI shell<br />
get            Display info for the search<br />
help           Provides help<br />
list           List files<br />
modify         Modify information for specified entry<br />
passwd         To modify user password<br />
ping           The normal ping command<br />
prompt         Change the user prompt<br />
reboot         Reboot the device<br />
remove         Remove file<br />
reset          Reset info for the specified entry<br />
size           ATM Sizing Information<br />
traceroute     The normal traceroute command<br />
trigger        To set trigger<br />
unalias        To undefine previously defined alias<br />
verbose        Switch ON/OFF the verbose mode<br />
$get dsl stats curr</p>
<p>No.  of  15  Min. Valid Data Intervals   : 6<br />
No.  of  15  Min. Invalid Data Intervals : 0<br />
Current  15  Min. Elapsed Time (MM:SS)   : 6:56<br />
Current  15  Min. Errored Seconds        : 0<br />
Current  15  Min. Sev Errored Seconds    : 0<br />
Current  15  Min. Unavailable Seconds    : 0<br />
Current  Day Elapsed Time (HH:MM:SS)     : 1:51:56<br />
Current  Day Errored Seconds             : 0<br />
Current  Day Sev Errored Seconds         : 0<br />
Current  Day Unavailable Seconds         : 38<br />
Previous Day Monitored Time (HH:MM:SS)   : 0:0:0<br />
Previous Day Errored Seconds             : 0<br />
Previous Day Sev Errored Seconds         : 0<br />
Previous Day Unavailable Seconds         : 0<br />
$get dsl params</p>
<p>Vendor ID            : 0039<br />
Revision Number      : E.37.2.8<br />
Serial number        : 123456789abcdx<br />
Self Test            : Passed              Framing Structure     : Unknown<br />
Standard             : ADSL2/2+            Trellis Coding        : -<br />
Local Tx. Power(dB)  : 12.6                Remote Tx.Power(dB)   : 0.0<br />
Local Line Atten(dB) : 18.5                Remote Line Atten(dB) : 11.5<br />
Local SNR Margin(dB) : 12.5                Remote SNR Margin(dB) : 6.5<br />
Tx Line Rate(kbps)   : 0                   Rx Line Rate(kbps)    : 0<br />
Up SValue            : -                   Down SValue           : -<br />
Up DValue            : -                   Down DValue           : -<br />
Data Boost           : -                   Max Att. DnS LR(kbps) : 0        </p>
<p>           UpIntrlvd UpFast DownIntrlvd DownFast<br />
AS0(kbps): -         -      -           -<br />
AS1(kbps): -         -      -           -<br />
LS0(kbps): -         -      -           -<br />
LS1(kbps): -         -      -           -<br />
RValue   : -         -      -           -<br />
$<br />
</code></p>
<p>Anyway&#8230; now that you are able to get some informations out of your DSL modem/router. I actually like my <a href="http://openwrt.org">OpenWrt</a> based router&#8230;. damn&#8230;</p>
<p>&#8230;. writing this I just realized that this whole problem might not be related to my broadband provide &#8211; you remember, I just wanted to figure out why my connection was so slow before I tried to mess around with my modem &#8211;  but to the not configured QOS settings of my so beloved OpenWrt router. Before I went to Dortmund my router got a little software update. Check, confirmed. QOS disabled.</p>
<p>&#8230; now that I have my whole bandwidth back&#8230; what was the point&#8230; right: I love my OpenWrt router. So I like to keep the bridge configuration but want to be able to access the DSL modem/router/bridge from within my local network behind my OpenWrt router. Therefore I have to adjust the firewall configuration a little. First make sure, that your modem and your router are not in the same subnet. I decided to configure my router to be <code>192.168.2.1/24</code> and the modem to stay as <code>192.168.1.1/24</code>.</p>
<p>Now, the adjustment of the router&#8217;s firewall:</p>
<p><code><br />
martin@kovalski:~$ ssh root@192.168.2.1<br />
root@192.168.2.1's password: </p>
<p>BusyBox v1.4.2 (2008-10-01 22:05:02 CEST) Built-in shell (ash)<br />
Enter 'help' for a list of built-in commands.</p>
<p>  _______                     ________        __<br />
 |       |.-----.-----.-----.|  |  |  |.----.|  |_<br />
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|<br />
 |_______||   __|_____|__|__||________||__|  |____|<br />
          |__| W I R E L E S S   F R E E D O M<br />
 KAMIKAZE (7.09) -----------------------------------<br />
  * 10 oz Vodka       Shake well with ice and strain<br />
  * 10 oz Triple sec  mixture into 10 shot glasses.<br />
  * 10 oz lime juice  Salute!<br />
 ---------------------------------------------------<br />
root@SRB178:~#  ifconfig eth0.1 192.168.1.2 up<br />
root@SRB178:~# iptables -t nat -A postrouting_rule -o eth0.1 -d 192.168.1.1/24 -j MASQUERADE<br />
root@SRB178:~# iptables -A forwarding_rule -i br-lan -o eth0.1 -p tcp --dport 80 -d 192.168.1.1 -j ACCEPT<br />
root@SRB178:~# iptables -A forwarding_rule -i br-lan -o eth0.1 -p tcp --dport 23 -d 192.168.1.1 -j ACCEPT<br />
</code></p>
<p>First configure your WAN interface. Then the firewall: The first rule is to masquerade the traffic from <code>192.168.2.0/24</code> as <code>192.168.1.2</code>. The modem/router does not know anything about the <code>192.168.2.0/24</code> network. It will receive the requests out of the network but does not know where to send them back.<br />
The other two rules are to allow the forwarding of traffic from the internal network to the modem/router on port 80 (http) and 23 (telnet).</p>
<p>If you want to get the informations easier than manually telnet into the modem and send the commands you can also use the fancy <a href="http://dmt.mhilfe.de/">DSL-Modem Tool</a>. There are several versions of this tool for different modems, but basically they all seem to use telnet to gather the informations.</p>
<p>By the way, the user name and password for accessing my modem were:<br />
User: <code>alice@13184</code> password: <code>hnto$mgmt@lice</code><br />
This is the default configuration of my broadband provider <a href="http://www.alice.de/">Alice</a>.</p>
<p>kthxbye.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.evilgenius.de/2008/10/09/configuring-your-dsl-modem-through-your-router/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
