[mdlug] Linksys dd-wrt router on SecureTether

Drew drew4096 at gmail.com
Sat Mar 6 14:32:18 EST 2021


Found another power supply and got a second router working: a Linksys WRT54G.
This one, unlike the TP-LINK routers, has no USB port, so I thought it would
be ideal for another task, handling internet connections to the phone.

It already had dd-wrt on it! However, it's a much older build, 12548M from
2009. And according to the dd-wrt database, this particular router is "neutered"
and so far as I can tell, unable to run any later build.

In spite of which I already have the radio (there apparently is only
one in spite
of there being two antennae) set to Client mode and connecting to the phone's
native Tethering app whenever Tethering is turned on, and it's even getting
the time via NTP (most of the time).

The next task is getting it to work with Secure Tether.

On the laptop, connecting to Secure Tether involves running the following
sequence of commands:

sudo touch /etc/ppp/options
echo nodetach noauth usepeerdns defaultroute | sudo tee
/etc/ppp/peers/securetether
sudo pppd user "Default" password 123 call securetether pty "nc
192.168.49.1 8823"

which I should be able to compress to

pppd user "Default" password 123  nodetach noauth usepeerdns
defaultroute pty "nc 192.168.49.1 8823"

However, there are a few problems.

First, everything outside of /tmp is read only.

Second, there is no nc or netcat command. For that matter, there is no ls
command either! in spite of which I was able (by cobbling something together
using grep and sh's built-in test command) to get a list of the commands
that it does have.

These are the commands I have to work with:


/bin/ash  L  X  W
/bin/busybox  X  W
/bin/cat  L  X  W
/bin/chmod  L  X  W
/bin/cp  L  X  W
/bin/date  L  X  W
/bin/echo  L  X  W
/bin/egrep  L  X  W
/bin/fgrep  L  X  W
/bin/grep  L  X  W
/bin/hostname  L  X  W
/bin/kill  L  X  W
/bin/login  L  X  W
/bin/mkdir  L  X  W
/bin/pidof  L  X  W
/bin/ping  L  X  W
/bin/ps  L  X  W
/bin/rm  L  X  W
/bin/sh  L  X  W
/bin/sleep  L  X  W
/bin/touch  L  X  W
/bin/wc  L  X  W
/sbin/beep  L  X  W
/sbin/brctl  L  X  W
/sbin/check_ps  X  W
/sbin/check_ses_led  L  X  W
/sbin/ddns_success  L  X  W
/sbin/erase  L  X  W
/sbin/event  L  X  W
/sbin/filter  L  X  W
/sbin/filtersync  L  X  W
/sbin/get_wanface  L  X  W
/sbin/getbridge  L  X  W
/sbin/getbridgeprio  L  X  W
/sbin/getmask  L  X  W
/sbin/gpio  L  X  W
/sbin/halt  L  X  W
/sbin/hb_connect  L  X  W
/sbin/hb_disconnect  L  X  W
/sbin/hotplug  L  X  W
/sbin/ifconfig  L  X  W
/sbin/init  X  W
/sbin/insmod  L  X  W
/sbin/ipupdated  L  X  W
/sbin/klogd  L  X  W
/sbin/ledtool  X  W
/sbin/listen  X  W
/sbin/logread  L  X  W
/sbin/lsmod  L  X  W
/sbin/misc  L  X  W
/sbin/mtd  L  X  W
/sbin/ntpd  L  X  W
/sbin/poweroff  L  X  W
/sbin/process_monitor  X  W
/sbin/radio_timer  X  W
/sbin/rc  X  W
/sbin/reboot  L  X  W
/sbin/redial  L  X  W
/sbin/resetbutton  X  W
/sbin/restart_dns  L  X  W
/sbin/restore  L  X  W
/sbin/rmmod  L  X  W
/sbin/roaming_daemon  L  X  W
/sbin/route  L  X  W
/sbin/sendudp  L  X  W
/sbin/setpasswd  L  X  W
/sbin/setuserpasswd  L  X  W
/sbin/site_survey  L  X  W
/sbin/softwarerevision  L  X  W
/sbin/start_single_service  L  X  W
/sbin/startservice  L  X  W
/sbin/startservice_f  L  X  W
/sbin/startservices  L  X  W
/sbin/startstop  L  X  W
/sbin/startstop_f  L  X  W
/sbin/stopservice  L  X  W
/sbin/stopservices  L  X  W
/sbin/supplicant  L  X  W
/sbin/syslogd  L  X  W
/sbin/ttraff  X  W
/sbin/vconfig  L  X  W
/sbin/watchdog  L  X  W
/sbin/wland  X  W
/sbin/wol  L  X  W
/sbin/write  L  X  W
/usr/bin/[  L  X  W
/usr/bin/[[  L  X  W
/usr/bin/free  L  X  W
/usr/bin/killall  L  X  W
/usr/bin/logger  L  X  W
/usr/bin/sort  L  X  W
/usr/bin/test  L  X  W
/usr/bin/uptime  L  X  W
/usr/bin/wget  L  X  W
/usr/sbin/cron  X  W
/usr/sbin/dhcp_lease_time  X  W
/usr/sbin/dhcp_release  X  W
/usr/sbin/dhcpfwd  X  W
/usr/sbin/dnsmasq  X  W
/usr/sbin/dumpleases  X  W
/usr/sbin/httpd  X  W
/usr/sbin/igmprt  X  W
/usr/sbin/inadyn  X  W
/usr/sbin/ip  X  W
/usr/sbin/iptables  X  W
/usr/sbin/iptables-restore  L  X  W
/usr/sbin/nas  X  W
/usr/sbin/nas4not  L  X  W
/usr/sbin/nas4wds  L  X  W
/usr/sbin/ntpclient  X  W
/usr/sbin/nvram  X  W
/usr/sbin/pppd  X  W
/usr/sbin/pptp  X  W
/usr/sbin/radius-client  X  W
/usr/sbin/radiusallow  X  W
/usr/sbin/radiusdisallow  X  W
/usr/sbin/svqos  X  W
/usr/sbin/svqos2  X  W
/usr/sbin/tc  X  W
/usr/sbin/telnetd  L  X  W
/usr/sbin/udhcpc  X  W
/usr/sbin/udhcpd  X  W
/usr/sbin/upnp  X  W
/usr/sbin/wl  X  W
/usr/sbin/wlconf  X  W
/usr/sbin/wol  X  W
/usr/sbin/wrt-radauth  X  W

L == a link, probably to busybox; X = Executeable, and W = theoretically
writeable, though it's on a read-only filesystem.

And I'm unlikely to be able to put more commands on it, though it does
accept scripts and sh functions cut and pasted in on a temporary basis. And
there IS a pppd.

Also, I'm told that

(exec 3<>/dev/tcp/ip-address/port; cat >&3; cat <&3; exec 3<&-)

in bash is supposed to be able to serve the function of netcat. However, I
don't have bash, only sh; and there is no /dev/tcp either.

The web gui has pppoe and pptp options, but I haven't found a way to give it
the address and port that I'm supposed to netcat to. EDIT: the pptp option
has a space for the ip address but none for the port number.

So can anyone here figure out a way, using the commands available, to get
the router to do the same thing that the laptop does with Secure Tether?


More information about the mdlug mailing list