Hacking the Dlink 502T router

I have upgraded my 256kbps ADSL to 512kbps and it is bundled with Dlink 502T router. Soon after installation I found that it runs Linux :). Hacker inside me decided to play around this router.

How do I Log in to router interface via telnet

You can login over telnet. This is common feature of all router these days and this the only way to hack into box:

=> Default IP:
=> Default Username: admin (or use root both are having UID 0)
=> Default Password: admin

WARNING! These examples are not about stealing other users bandwidth or passwords. Most A/DSL provider control many properties on their end. Hacker is a person who delights in having an intimate understanding of the internal workings of a system, computers and computer networks in particular. This article is not about stealing or cracking other users network equipment.

I have changed IP of router to so here is my first session:
$ telnet
Sample output:

Connected to
Escape character is '^]'.

BusyBox on (none) login: root

BusyBox v0.61.pre (2005.05.30-08:31+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

Let us see password file, enter:
# cat /etc/passwd


Hack #3: Get more information about router hardware and Linux

Since this is tiny device most of the userland command such as free, uname etc are removed. However /proc file system provides all information.

Display CPU Information
# cat /proc/cpuinfo
Display RAM Information
# cat /proc/meminfo
# free

Display Linux versions
# cat /proc/version

Linux version 2.4.17_mvl21-malta-mips_fp_le (jenny@fd6e) (gcc version 2.95.3 20010315 (release/MontaVista)) #70 Mon May 30 16:34:48 CST 2005

Display list of running Processes:
# ps

Display list of all kernel module:
# lsmod

Hack # 3: Get more information about network

Display list of all network interfaces:
# ifconfig
Get your Internet public IP info:
# ifconfig ppp0

ppp0      Link encap:Point-Point Protocol
          inet addr:61.xxx.xxx.xxx  P-t-P:61.xxx.xxx.xxx  Mask:
          RX packets:69586 errors:0 dropped:0 overruns:0 frame:0
          TX packets:62540 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:80566538 (76.8 Mb)  TX bytes:5349581 (5.1 Mb)

Get default routing information i.e. find out your ISP’s router:
# route

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
61.xxx.xxx.xxx  *      UH    0      0        0 ppp0     *        U     0      0        0 br0       *            U     1      0        0 br0
default         dsl-xx-00x.xx.x         UG    0      0        0 ppp0

Display ethernet statics such as speed and other details:
# cat /proc/avalanche/eth0_rfc2665_stats

Display DSL modem stats:
# cat /proc/avalanche/avsar_modem_stats

Display Iptables firewall rules:
# iptables -L -n

Flush/Stop firewall rules (don’t flush untile and unless you have solid reason to do it )
# /etc/flush_firewall

Hack 4 : Secure your router

(A) Open a web browser such as firefox and login to web based interface. Type url

(B) Enable Firewall
By default firewall is disabled :/? turn it on to protect your router as it runs linux. Click on Home > Wan > Scroll down and select Firewall as Enabled. Click on Apply.

(C) Change default admin password
Click on Tools > Select Administrator and type the password. > Click apply

(D) Save changes and reboot router
Click on Tools > System > Click on Save and Reboot button

Please note that most ISP including Airtel, BSNL and others these days use this router. And by default admin password is not changed by user, in addition to that some software bug exists that allows remote administration via telnet/http. So turning on firewall saves your day.

Hack # 5: Miscellaneous information

Display developer information i.e. the people behind this router development:
# cat /proc/avalanche/developers

Quickly reboot the router:
# reboot

All your binary stored in /bin/ /usr/bin /sbin directory.

More Resources:

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 77 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
77 comments… add one
  • Will Oct 26, 2005 @ 1:15

    I work for an Internet Service provider and am trying to learn more about the Actiontek DSL Gateways we use… i found this pretty helpful. The Actiontek actually runs the same OS as the Dlink 502T, so yeah, this really helped. Thanks.. 🙂

  • LinuxTitli Oct 26, 2005 @ 3:33

    you are right this linux kernel and os is common on most DSL routers these days.

    Appreciate your post and feedback

  • Anonymous Jul 3, 2006 @ 0:09

    is this a way u can change ur speed from 256kbps to 512 kbps…
    please tell me guys

    • Jonah Dec 28, 2014 @ 14:36

      You cannot change the speed package you’re on, that’s on the ISPs end. However, you can change the SNR margin settings. Possibly setting a lower margin will allow the modem to sync faster, but that’s at the expense of stability.

  • 🐧 nixcraft Jul 3, 2006 @ 2:45

    You cannot change speed from 256 to 512. It is controlled by your ISP. You don’t have any control over this process.

  • Anonymous Jul 6, 2006 @ 13:20

    i have fogoten the password for my DLink 502T DSL router. Is there any way for me to retrieve the same. I dont want to reset the router settings using the hardware switch.

  • 🐧 nixcraft Jul 6, 2006 @ 18:55


    Try default admin/admin

    But there is no other way… reset the modem and call your DSL service provider they will tell you new settings.

  • Anonymous Jul 24, 2006 @ 17:26

    I have DLink DSL G604T, unfortunately i’m not familiar with Linux command. What are the command syntax to change/view the “txatten” via telnet (CLI) to the device ?.

    Another request if possible could you listed, some of the common command use with this router.. 🙂

    ps: Great work here! 😉


    • mithious Jan 23, 2012 @ 18:44

      Hi Anonomous,

      I have heard lots about you. I am older and havent grown up in the techno age but really really want, and NEED to learn the “craft” 😉 are you at all interested in teaching me? I also have memory issues from a bad car accident 9 years ago…just so you know..I have very basic techno skills and would need lots of instruction…r u up for a challenge? I believe in the cause and am worried that without knowledge, i will end up on the losing side of free expression…ya dig? 🙂 Thanks for atleast considering my proposal…I have lots of time, am in a wheelchair, but little funds …another fyi 🙂

      • mithious Jan 30, 2012 @ 23:38

        Just checking to see if you answered me…thanks anyway….keep up the good work and stay true to the cause 🙂 Mith

  • Filipe Sep 13, 2006 @ 3:07

    I’ve just been messing about with my DSL-G604T, uses the same commands, but you can only login using root (no matter what you’ve changed your regular username to in the web menu), using hatever password you have specified in the web menu settings.

    Anyhu, very very useful post. Never even knew I could control my router through Telnet. This will definately be useful when it becomes obsolete (read, if)

  • rohit Feb 12, 2007 @ 6:41

    hello nixcraft ,
    i want to know how to increase speed of broadband?
    i am using xp ..and 256kbps speed from mtnl !!!tell me how can i increase the speed????

  • Richard Feb 15, 2007 @ 9:18

    every time i try to log into my DLink 502T DSL router it asks if i wanna connect to the net. If i click yes it bombs out, if i click no it stils bombs out. Any suggestions as to what it could b?

  • karthik Mar 19, 2007 @ 2:51

    i have a problem with the DSL 502T router.The ethernet led blinks and it will not allow me to download files above 2Mb.My internet connection is BSNL broadband.Helpme out so that i can continue with regular download.

  • lame_ass Mar 19, 2007 @ 19:44

    Here in Russia there was a great hacking of D-Link routers, 300T as well as 50xT (x == 0, 2 and 4 AFAIK).As long as vendor supplies source and MIPS toolchain is available, you can treat D-Link as some small network computer running usual Linux and some Linux programs.This means you can compile your own programs and run them here, as long as you fit into flash file system and RAM is not exhausted.

    Some of most hardcore people will find http://mcmcc.bat.ru/dlinkt/ link useful.Unfortunately some parts are in Russian.Sorry.

  • INDIA DLINK Mar 31, 2007 @ 7:49

    Can i open the *.bin file of my Dlink-502T router ???

    i want 2 c the contents of that file…..is that possible ???

  • AJ Apr 18, 2007 @ 18:01

    how can i use others bsnl user-id and password to connect the internet how ? ??

  • viju May 5, 2007 @ 10:09

    my 502T tends to hang when ‘reboot’ed from telnet. this looks to be random as it works sometimes.as my ISP -MTNL- requires me to reset it everyday at 0000hrs and 0800 hrs, i have no other option than to do it via a telnet using a script. I am new to linux.Can u suggest some ways to correct this? thank you

  • harish May 8, 2007 @ 8:17

    i am having a problem with the same modal, 502t the adsl link not get stable. what i did actually it was working with one computer fine but when i connect it with the switch and then it work fine for appx one hour after that the link of adsl not getting stable and i am not able to access the internet plz suggest.

  • Rush May 20, 2007 @ 8:07

    HI i want to configure DSL-502T in FEDORA 4 to connect to my ISP (BSNL) via the USB.. Are the USB drivers for the same available.
    Can anyone advise me how to do it ??
    It is working fine with winXp as of now

  • Emperor Jul 6, 2007 @ 10:04

    i have two D-link modem…one is DSL 504(old one) and DSL 520(new)…this 520 using linux also.my problem is,when i use tracert command on this 520,there is no reply (request timed out).with 504,the reply is normal…i suspect there is some setting in 520 dont allow tracert.can anyone help me?Thanks in advanced.

  • Dinesh Shah Jul 10, 2007 @ 8:57

    I have MTNL triband connection. I have got my friends triband username and password. Initially is working but now I don’t get connection when I enter his username and password. When I test connection fowlling messages come.Testing Ethernet connection=PASS,Testing ADSL line for syncPASS,Testing Ethernet connection to ATMPASS,Testing ATM OAM segment pingPASS
    Testing ATM OAM end to end pingPASS
    Testing PPPoE server connectivityPASS
    Testing PPPoE server sessionFAIL
    Testing authentication with serverFAIL
    Validating assigned IP address
    Testing Internet Connectivity
    Ping default gateway
    Please give me the solution
    thks in advance

  • himanshu Jul 31, 2007 @ 17:36

    What is command to save changes made by ifconfig via telnet ?

  • Hanmant Aug 1, 2007 @ 6:51

    Great work Vivek.I like the artical from ou.
    Hope to see more from you. 🙂


  • kiran Aug 7, 2007 @ 19:38

    hi, i have a prob can i know how to enable port forwarding in the dlink 502t routers…pls reply…

  • amy Aug 15, 2007 @ 18:36

    hey buddy
    can we hack our mtnl line n by using my frineds tel no n password ,is it possible 4 me 2 use da net where i will not get ne bill at all
    and thus i can download loaads free of cost
    plss buddy tel me how 2 do it

  • Amar Aug 21, 2007 @ 8:10

    Hi friend,

    I have 502T modem,I tried to login using telnet
    it asked user name I gave Root ,but what’s the password????,I need this,please can u please tell me,every week my modem’s MAC id gets change automatically due to power fluctuation most probably,can u plz tell me how to change the MAC id also????,so that every time it gets reset to some value I can bring it back to the original one.

    Thanks in advance.

  • Amar Aug 21, 2007 @ 13:10

    oh!I got the password,I missed the line,but how to change the MAC id can u plz tell me,once I been to Dlink service center I saw a people running a batch file,in that batch file ,it was same sort of telnet login,but didn’t see what command was there inside batch file or script for changing MAC,I tried with
    # ifconfig eth0 hw ether 00:80:48:BA:d1:20
    but didn’t work

  • catious Sep 21, 2007 @ 16:47

    I got Mtnl triband. my router is Dlink-GLB502T. Is there anyway to hack it in the sense…I get only 400Mb of download per month…I want to increase it if possible to unlimited. Is it possible??

  • tirtha Oct 2, 2007 @ 20:33

    hii…i am a user of bsnl bb….250 skim….bt my free limit is jst i gb…i read dis article bt …i cant understand full….can u suggest anything plz…i really need dis …for good perpose…is it possible download unlimitadly….not affecting my i gb limit…plz gimme suggetion…i need dis to upload..n help others

  • xmelzax Nov 19, 2007 @ 4:47

    lol tirtha.
    i has 512kbps line with 1gig limit but 2dAY i r haxx my modem with telnet now i kan download at 11mbps and i has unlimited bandwidth!! liek z0mg uber hax

  • Terence cheong Dec 14, 2007 @ 19:51

    hi there… I am currently sharing my internet service with a motorola sbg1000 wireless modem cum router system… i recently forgotten my user id and password to change the setting in the router… and i need to deactivate the firewall so that some of my program can run…. how can u retrive back the user id and password so that i can change the setting… or is there anyway to bypass the firewall without chaging the setting in the router

  • Tanmay Dec 20, 2007 @ 10:29

    yes there is a way to get ur same password

    click on wan the id is there
    right click and click on view source
    in this source search for a file named password
    and if u get in the value field u will have ur password

  • arshad Jan 6, 2008 @ 17:40

    i reset my d-link router ip after i am typing default ip but not cming home page

  • Thalib Apr 8, 2008 @ 12:50

    Hey..i hve LINKSYS WAG200G ROuter…and i hve forgotten the pass..and dnt want to reset it….all i want is..i want 2 forward some ports…or switch off the firewal..is there any way 2 achieve this..or any way 2 hack the pass???
    plz mail me on.. ” thalib_frk@yahoo.co.in

    thx in advance 😀

  • ashish Apr 17, 2008 @ 16:50

    i am using mtnl 199plan for broadband. the problem is that there is only 400mb download is free in it. can u tell me a way or tell me setting so that i hack mtnl and download free by hacking.plz tell me as soon as possible

  • ashley lobo May 10, 2008 @ 7:33

    Hi! I need to hack mtnl triband so as to get an unlimited connection.Can someone guide me to do the same?
    It is urgent.Please help?

  • LennyD Jul 7, 2008 @ 16:14

    To Ashley / Ashish

    You cannot hack to do this as it is controlled from the ISP ‘s end – stop being a moron

  • ananth Oct 17, 2008 @ 9:29

    hi am using hathway.. i need to increase my speed from 128 to 512 ..plss mail and help me regarding this issue..

  • Mikuro Oct 27, 2008 @ 19:59

    to people asking for speed/bandwidth hacks-

    please read the article again, it’s about getting in and messing around in the routers firmware (linux) and has nothing to do with your ADSL link to your ISP. If you want to ‘hack’ yourself more speed/bandwidth, find an article about hacking your ISP (I don’t reccomend this, however).

    great article, found out about its CLI in telnet a couple days ago but didnt know many commands, thx

  • Gayan Nov 27, 2008 @ 14:49

    I’m from sri lanka. my service provider give me only very small bandwith.
    But if i get a username and pass from another one i can login from his account and can browse 4 unlimited bandwith.
    but the thing is i have to reveal his username and password from his router.
    type of router is unknown. is this possible?

    plz help

  • ananth Dec 17, 2008 @ 18:27

    am using hathway 128 kbps connection. scientific atlanta 2100 modem
    how to increase my speed upto 2mbps and download speed

  • mahesh Dec 24, 2008 @ 12:18

    i want to know how i icrease my internet speed i m using mtnl connection 256kps
    ,d link glb502t modem i want to increase my download as well as browsing speed

  • Apna Jan 21, 2009 @ 10:51

    Can you give details on how to hack for Windows XPP?

  • Shani Jan 26, 2009 @ 7:24

    How do i renew the ip without reboot??

  • Niels Dettenbach Feb 14, 2009 @ 14:34

    in principe you have to reconnect to your ISP to let him give you randomly another IP address from his dynamic IP pool. I dont know the G654 Linux in all details or if thre is a regarding button in the web-interface but usually it should work with something like:

    ifconfig ppp0 down
    ifconfig ppp0 up

    if that didnt work (means the DLink would not break / reconnect the ADSL-IP link) i will take a look for the correct command sequence on that d-link box.

    I dont understand why there are any peoples out wich are believing they can “boost up” their ADSL contract / line by “hacking” their DSL-Routers just by telnetting their own wan routers. This page is just a small but good) howto about the (most times not very useful) telnet interface of that device.

    Yes, you are able to “read” all Linux passwords in the /etc/passwd or /etc/shadow files – but encrypted (you have to crack them outside). To get this file you have to be root (and know the root pw).

    Someone who is not at minimum clear about the work of an ISP would not be able to cheat or trick him in such a wise as discussed here.

    In case you have enough time and brain may be you should be able to learn how an ISP is working and – at the next step – how you can “trick” or “cheat” him. Otherwise pls dont waste your time and use it to really get into Linux, Unix and Open Source software. After that may be you will get a first view how your ISP is working and where you have to look for decurity holes. There are some good “hacking” or “hacker howto” around public in the net wich will teach you how you could be a “hacker”. Rtfm…



  • bimal marwah Feb 16, 2009 @ 17:26

    d-link dsl502t adsl router working the best , used on mtnl delhi tel. line.

  • Soni Mar 16, 2009 @ 8:20

    i m using airtel mobile office.its downloading speed is very slow.can anybody tel me how can i increase its speed.i m using opera browser.plz plz plz…… My email add is

  • Rustam Mar 24, 2009 @ 16:14

    Use echo to list folders.
    echo /*
    echo /etc/*

  • haildail Apr 23, 2009 @ 1:26

    Thanks great post , amazing how powerfull little box can be.
    I see it has gcc does that mean i can complie new progs ?
    Also any idea how to edit files ?

    Thanks Rustam , very nice.

  • im back May 5, 2009 @ 5:11

    Also to get out of routers default stupid terminal run “sh” .
    I want to ask as no one seems to be able to help me , I want to
    get read and write access to the router , but because the partions have been
    squashfs (ro) rendering them read only , I can’t chmod them.

    Thanks for your post


  • Piotr Jun 29, 2009 @ 15:55

    How do i renew the ip without reboot??
    This commands not work:

    ifconfig ppp0 down
    ifconfig ppp0 up

  • Rampreet Aug 18, 2009 @ 9:09

    i have a dsl modem (dlink) model no.dsl-A604T/Eg
    it is working fine but some times my https web mail site not open.
    Sometimes outlook disconnect to server and webmail page not open.
    Internet works fine. but when I restart the modem every thing goes fine.
    For Almost 1-2 hours please suggest me to fix this problem.


  • Nikhil Aug 26, 2009 @ 10:43

    Hey guys,
    Just let me know the userid and password to telnet into busybox Dlink ADSL router.

  • Newton Sep 18, 2009 @ 22:45

    First, thanks for all tips!!
    I have a DSL-2640B. To renew IP I use the following command:
    > ppp config 0.0.33 down
    > ppp config 0.0.33 up

    0.0.33 is my Port.VPI.VCI

  • Dikel Oct 3, 2009 @ 5:46

    i hava a beetel 450BXI ADSL + ROUTER But unidentified network how to reset the router to default setting??

  • ucupsz Dec 18, 2009 @ 16:52

    i guys..
    i have D-Link DSL-522T. It has one UTP, one USB port, and 1 RJ-11 for ADSL line.
    is there any workaround that could use the USB port for printer(w/ USB connection)
    so i can use it as adsl modem and printer server?

    thanks in advance.

  • rohit Dec 21, 2009 @ 17:38

    it is possible to connect internet from a person whose iknow all password of modem . could i connect from mid of wire coming from poll by using another modem and configuring on another ac which i know .please gives me tips and steps to do it

  • rohit Dec 21, 2009 @ 18:25

    is it possible to connect by using password and usename mtnl connection

  • FunDreamz Jan 5, 2010 @ 14:53

    Using DSL-502T. I am unable to keep the firewall enabled. As soon as the router is restarted the firewall gets disabled. please help guys.

  • nikhil Feb 21, 2010 @ 20:51

    very informative post
    thumbs up

  • Mikuro Feb 23, 2010 @ 11:13


    Ensure you have saved your settings after reconfiguring from “Tools > System > Save and Reboot”.

  • FunDreamz Feb 24, 2010 @ 4:41

    Thanks Mikuro,
    Firewall is now enabled. However, when I tested it for any leaks through grc.com/leaktest it failed. Is there any other setting required to make it un-penetratable ?

  • ryad Apr 15, 2010 @ 13:14

    Hi sir and thanx for this but i just want to know how to extract ppp username and pass from the router

    • Anonymous May 18, 2010 @ 19:04

      just tftp -i get TEimage.bin te.bin

  • Deepak Aug 5, 2010 @ 14:47

    Hi there, I am using D-link 502T but don’t have WAN option and thus not able to find the root password. I am seeing the ‘Home, Setup, Advanced, Tools , Status and Help options’ only and there is no WAN sub-option in any of these pages as well. Please help.

  • Ashish Oct 18, 2010 @ 7:01

    Thanks buddy! Your article helped me to write reconnect script for my HUAWEI WA1003a router which also runs on busybox.

  • Andrew Nov 27, 2010 @ 5:47

    Hi is there anyway I can quickly list the DHCP clients connected to my modem using busybox?

  • SAID Mohamed Feb 17, 2011 @ 12:56

    Hi every body, I want to logging in my router via telnet automatically using bat file (under windows), or typing the username and pass inside the bat file?

  • rom Apr 21, 2011 @ 7:32

    how to hack a password for router D-LINK DIS-1020D??

  • Paul Jul 11, 2011 @ 5:00

    I have a 3G CDMA HUAWEI QUALCOMM on starcomms Nigeria a desktop table phone. How can i make use of the modem.

  • Bilal Mar 24, 2012 @ 11:21

    Blink1E7E35 can u give the password plz

  • asskicker Nov 17, 2012 @ 13:04

    you call this even hacking so lam 😀 get sm life

  • Deryl Dec 9, 2014 @ 17:35

    How can change with busybox Snr settings??

  • Sage Aug 6, 2015 @ 10:26

    Id like to know how to change SNR too? surely there is a cfg file or something we can edit?

  • Farshad Aug 9, 2015 @ 14:13

    Hi all
    How can i add or delete a wan interface such as pppoe or pppoa over a specified vpi/vci with user and pass trough shell commands.
    i.e. with “xtmcmd” command i

  • Croom Oct 21, 2015 @ 4:25


Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum