{"id":104,"date":"2008-10-09T23:38:42","date_gmt":"2008-10-09T21:38:42","guid":{"rendered":"http:\/\/www.evilgenius.de\/?p=104"},"modified":"2018-07-02T18:28:01","modified_gmt":"2018-07-02T16:28:01","slug":"configuring-your-dsl-modem-through-your-router","status":"publish","type":"post","link":"https:\/\/www.evilgenius.de\/?p=104","title":{"rendered":"Configuring your DSL modem through your router"},"content":{"rendered":"<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>\n<p><!--more--><\/p>\n<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>\n<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>\n<p><code><br \/>\nmartin@kovalski:~$ telnet 192.168.1.1<br \/>\nTrying 192.168.1.1...<br \/>\nConnected to 192.168.1.1.<br \/>\nEscape character is '^]'.<\/p>\n<p>                         ******************<br \/>\n                               Welcome<br \/>\n                         ******************<\/p>\n<p>Software Release R100B01.0B_HN_20060406<br \/>\nCopyright (c) 2001-2004<\/p>\n<p>login: alice@13184<br \/>\npassword:<br \/>\nLogin Successful<br \/>\n$help<br \/>\nCommand        Description<br \/>\n-------        -----------<br \/>\nalias          To Alias a command<br \/>\napply          Apply configuration\/image file<br \/>\ncommit         Commit the active config to the flash<br \/>\ncreate         Create a new entry of specified type<br \/>\ndelete         Delete the specified entry<br \/>\ndownload       Download a file on to the Device<br \/>\nexit           To exit the CLI shell<br \/>\nget            Display info for the search<br \/>\nhelp           Provides help<br \/>\nlist           List files<br \/>\nmodify         Modify information for specified entry<br \/>\npasswd         To modify user password<br \/>\nping           The normal ping command<br \/>\nprompt         Change the user prompt<br \/>\nreboot         Reboot the device<br \/>\nremove         Remove file<br \/>\nreset          Reset info for the specified entry<br \/>\nsize           ATM Sizing Information<br \/>\ntraceroute     The normal traceroute command<br \/>\ntrigger        To set trigger<br \/>\nunalias        To undefine previously defined alias<br \/>\nverbose        Switch ON\/OFF the verbose mode<br \/>\n$get dsl stats curr<\/p>\n<p>No.  of  15  Min. Valid Data Intervals   : 6<br \/>\nNo.  of  15  Min. Invalid Data Intervals : 0<br \/>\nCurrent  15  Min. Elapsed Time (MM:SS)   : 6:56<br \/>\nCurrent  15  Min. Errored Seconds        : 0<br \/>\nCurrent  15  Min. Sev Errored Seconds    : 0<br \/>\nCurrent  15  Min. Unavailable Seconds    : 0<br \/>\nCurrent  Day Elapsed Time (HH:MM:SS)     : 1:51:56<br \/>\nCurrent  Day Errored Seconds             : 0<br \/>\nCurrent  Day Sev Errored Seconds         : 0<br \/>\nCurrent  Day Unavailable Seconds         : 38<br \/>\nPrevious Day Monitored Time (HH:MM:SS)   : 0:0:0<br \/>\nPrevious Day Errored Seconds             : 0<br \/>\nPrevious Day Sev Errored Seconds         : 0<br \/>\nPrevious Day Unavailable Seconds         : 0<br \/>\n$get dsl params<\/p>\n<p>Vendor ID            : 0039<br \/>\nRevision Number      : E.37.2.8<br \/>\nSerial number        : 123456789abcdx<br \/>\nSelf Test            : Passed              Framing Structure     : Unknown<br \/>\nStandard             : ADSL2\/2+            Trellis Coding        : -<br \/>\nLocal Tx. Power(dB)  : 12.6                Remote Tx.Power(dB)   : 0.0<br \/>\nLocal Line Atten(dB) : 18.5                Remote Line Atten(dB) : 11.5<br \/>\nLocal SNR Margin(dB) : 12.5                Remote SNR Margin(dB) : 6.5<br \/>\nTx Line Rate(kbps)   : 0                   Rx Line Rate(kbps)    : 0<br \/>\nUp SValue            : -                   Down SValue           : -<br \/>\nUp DValue            : -                   Down DValue           : -<br \/>\nData Boost           : -                   Max Att. DnS LR(kbps) : 0        <\/p>\n<p>           UpIntrlvd UpFast DownIntrlvd DownFast<br \/>\nAS0(kbps): -         -      -           -<br \/>\nAS1(kbps): -         -      -           -<br \/>\nLS0(kbps): -         -      -           -<br \/>\nLS1(kbps): -         -      -           -<br \/>\nRValue   : -         -      -           -<br \/>\n$<br \/>\n<\/code><\/p>\n<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>\n<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>\n<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>\n<p>Now, the adjustment of the router&#8217;s firewall:<\/p>\n<p><code><br \/>\nmartin@kovalski:~$ ssh root@192.168.2.1<br \/>\nroot@192.168.2.1's password: <\/p>\n<p>BusyBox v1.4.2 (2008-10-01 22:05:02 CEST) Built-in shell (ash)<br \/>\nEnter 'help' for a list of built-in commands.<\/p>\n<p>  _______                     ________        __<br \/>\n |       |.-----.-----.-----.|  |  |  |.----.|  |_<br \/>\n |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|<br \/>\n |_______||   __|_____|__|__||________||__|  |____|<br \/>\n          |__| W I R E L E S S   F R E E D O M<br \/>\n KAMIKAZE (7.09) -----------------------------------<br \/>\n  * 10 oz Vodka       Shake well with ice and strain<br \/>\n  * 10 oz Triple sec  mixture into 10 shot glasses.<br \/>\n  * 10 oz lime juice  Salute!<br \/>\n ---------------------------------------------------<br \/>\nroot@SRB178:~#  ifconfig eth0.1 192.168.1.2 up<br \/>\nroot@SRB178:~# iptables -t nat -A postrouting_rule -o eth0.1 -d 192.168.1.1\/24 -j MASQUERADE<br \/>\nroot@SRB178:~# iptables -A forwarding_rule -i br-lan -o eth0.1 -p tcp --dport 80 -d 192.168.1.1 -j ACCEPT<br \/>\nroot@SRB178:~# iptables -A forwarding_rule -i br-lan -o eth0.1 -p tcp --dport 23 -d 192.168.1.1 -j ACCEPT<br \/>\n<\/code><\/p>\n<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 \/>\nThe 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>\n<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>\n<p>By the way, the user name and password for accessing my modem were:<br \/>\nUser: <code>alice@13184<\/code> password: <code>hnto$mgmt@lice<\/code><br \/>\nThis is the default configuration of my broadband provider <a href=\"http:\/\/www.alice.de\/\">Alice<\/a>.<\/p>\n<p>kthxbye.<\/p>\n","protected":false},"excerpt":{"rendered":"<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 &hellip; <a href=\"https:\/\/www.evilgenius.de\/?p=104\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Configuring your DSL modem through your router<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10,16],"tags":[],"class_list":["post-104","post","type-post","status-publish","format-standard","hentry","category-hacking","category-kthxbye"],"_links":{"self":[{"href":"https:\/\/www.evilgenius.de\/index.php?rest_route=\/wp\/v2\/posts\/104","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.evilgenius.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.evilgenius.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.evilgenius.de\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.evilgenius.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=104"}],"version-history":[{"count":8,"href":"https:\/\/www.evilgenius.de\/index.php?rest_route=\/wp\/v2\/posts\/104\/revisions"}],"predecessor-version":[{"id":238,"href":"https:\/\/www.evilgenius.de\/index.php?rest_route=\/wp\/v2\/posts\/104\/revisions\/238"}],"wp:attachment":[{"href":"https:\/\/www.evilgenius.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.evilgenius.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.evilgenius.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}