Reconnect
From DD-WRT Wiki
Windows
Via TELNET-Skript
Requirements: - TST10 (tool for executing Telnet scripts)
The following script has to be execute through TST10:
reconnect.txt
- 192.168.1.1 23
- wait "login: "
- send "root\m"
- wait "Password: "
- send "admin\m"
- wait "~ #"
- send "killall -HUP pppoecd && sleep 16\m"
- wait "~ #"
- send "exit\m"
Change IP, user, password und process to your requirements. The process (here: "pppoecd" for PPPOE) depends on the type of your connection. You can run "TOP" via telnet or ssh to see which process you run to connect to the internet.
Last but not least you execute the reconnect via "TST10.exe /m /r:reconnect.txt". You can put this in a BAT-file of course.
Via NetCat
Requirements: - NetCat for Windows
reconnect.txt
- POST /apply.cgi HTTP/1.1
- Host: 192.168.1.1
- User-Agent: NetCat
- Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
- Connection: keep-alive
- Referer: http://192.168.1.1/Diagnostics.asp
- Authorization: Basic *LOGINHERE*
- Content-Type: application/x-www-form-urlencoded
- Content-Length: 142
- action=Apply&submit_button=Ping&submit_type=start&change_action=gozila_cgi&ping_times=1&next_page=Diagnostics.asp&ping_ip=killall+-HUP+pppoecd
Again, change IP twice and replace the "*LOGINHERE*" with your login data coded into Base64. A converter can be found here: [1]
Just enter your login data in the form "user:password", e.g. "root:admin" and click convert and paste the info in the TXT at the described position.
Remember that you may need to replace the "pppoecd" at the end with the process you use to connect to your ISP. Run a "TOP" via Telnet or SSH to check which one you need.
reconnect.bat
- @echo off
- nc 192.168.1.1 80 < reconnect.txt