Linux router help needed

 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Linux router help needed
# 8  
Old 04-21-2017
I do not recommend to change the firmware yourself without prior experience in this area. Chances to brick your device immediately are very high.

As of now it seems a good place to create your custom scripts within the /apps folder, which is writable and likely durable across reboots.

What's left is to figure out what mechanism your router-linux-distribution provides to call your scripts.

Since it's highly likely that some open source distribution is used, the first thing is to figure out which one it is(google, vendor homepage, product specifications, ...) and when the distribution name/type is found look/read for the possibillities for calling individual startup scripts.
# 9  
Old 04-22-2017
@Corona688 - no ""/etc/release" file only version:
Code:
RTL819xD v1.0 --  2017. 04. 13. (목) 20:01:43 KST
The SDK version is: Realtek SDK v3.4.9.4-r34739
Ethernet driver version is: 21743-21743
Wireless driver version is: 34739-34739
Fastpath source version is: -
Feature support version is: -

and
motd

Code:
RLX Linux version 2.0
         _           _  _
        | |         | ||_|                 
   _  _ | | _  _    | | _ ____  _   _  _  _ 
  | |/ || |\ \/ /   | || |  _ \| | | |\ \/ /
  | |_/ | |/    \   | || | | | | |_| |/    \
  |_|   |_|\_/\_/   |_||_|_| |_|\____|\_/\_/

For further information check:
http://processor.realtek.com/

@ygemici
1. Realtek of some kind as previous info sugests
2. no ideea Smilie
3. fstab doesnt seem to exist
Code:
cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / squashfs ro,relatime 0 0
proc /proc proc rw,relatime 0 0
ramfs /var ramfs rw,relatime 0 0
/dev/mtdblock5 /apps jffs2 rw,relatime 0 0
/dev/sda1 /var/tmp/usb/sda1 fuseblk rw,relatime,user_id=0,group_id=0,allow_other,blksize=4096 0 0
sysfs /sys sysfs rw,relatime 0 0

4.
Code:
cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00001000 "boot+cfg"
mtd1: 00200000 00001000 "linux(bank1)"
mtd2: 00800000 00001000 "root fs(bank1)"
mtd3: 00200000 00001000 "linux(bank2)"
mtd4: 00800000 00001000 "root fs(bank2)"
mtd5: 009c0000 00001000 "apps"
mtd6: 00200000 00001000 "tr069"

5.
Code:
 cd /bin
# ls
UDPserver                    lsmod
[                            md5sum
[[                           minidlna
acltd                        miniigd
adduser                      mkdir
aipc_util                    mknod
arp                          mmd_cmdr
ash                          mmd_cmdw
autocfg.sh                   mount
awk                          mp.sh
boa                          mp_98c.sh
boot_rcs.bin                 mp_factory.sh
brctl                        mtd
bunzip2                      multi_wan_test.sh
busybox                      mv
bzcat                        netcat
caller_id                    netstat
cat                          nmbd
check_link                   ntfs-3g
chgrp                        ntp_inet
chmod                        ntpclient
chown                        ob
conference                   ob1
config-dhcpd.sh              od
config_again_tr069.sh        od1
connect.sh                   openssl
connect6.sh                  orf
cp                           orf1
cp3_measure                  ow
crash                        ow1
crc                          passwd
crc1                         pcm_dump
create_multi_wan.sh          phyr
cut                          phyw
cwmpClient                   ping
date                         ping6
dbg                          poweroff
dd                           ppp8_solar.sh
ddns_inet                    ppp_inet
depmod                       pppd
detbuf2_dump                 pppoe.sh
df                           pppoe_conn_patch.sh
dhcp6c                       pppoe_disc_patch.sh
dhcp6cRcv.sh                 pptp
dhcp6ctl                     pptp.sh
dhcp6s                       printenv
dhcp6s.sh                    proslic_set
disconnect.sh                ps
dmesg                        pulse_dial
dnrd                         pwd
dns6.sh                      radvd
dns_task                     radvdump
dnsmasq                      ram
dtmf_det_cfg                 rdate
dtmf_det_test                reboot
dtmfdet_dump                 reboot.sh
dual_dhcp_test.sh            reg
dummy_ar4010                 reload
dw                           remove_multi_wan.sh
echo                         renice
ecmh                         rm
eth8_non_dhcp.sh             rmmod
eth8_rp_again.sh             route
ew                           routed
expr                         rssi
factory_check                rssi1
factorysw                    rtcp_logger
false                        rtcp_statistic
find                         rtk_cmd
firewall.sh                  rtp
flash                        rtp2
free                         script_check_l2tp_status.sh
fskgen                       sed
ftpget                       send_2833
ftpput                       setmib
fwd                          setmib1
fwdownload.sh                sh
fwup_check.sh                show
fwupdate                     sleep
fwupg                        slic_reset
fxo                          smbd
fxo_int                      smbpasswd
fxs                          snmpd.sh
fxs_int                      solar
getmib                       solar_monitor
getmib1                      startup.sh
gpio_init                    static_restart_tr069.sh
gpio_read                    stty
gpio_write                   sysconf
grep                         syslogd
halt                         systemInfo.sh
hdpw.sh                      tagged_eth1_test.sh
head                         tail
hexdump                      tc
hostname                     tcp2dev
iapp                         telnet
ib                           telnetd
ib1                          test
id1                          test_ivr_g711
idd                          test_ivr_g722
idd1                         test_ivr_g723
ifconfig                     test_ivr_g729
igmpproxy                    tftp
init                         tftpd
init.sh                      timelycheck
inotifyd                     timelymacfilter
insmod                       tone
ip                           top
ip_qos.sh                    touch
iptables                     tr
irf                          true
irf1                         udhcpc
ivr_text_play                udhcpd
iw                           umount
iw1                          up_usbStorage_apps
iwconfig                     updatedd
iwcontrol                    uptime
iwpriv                       usbStorageAppController
kill                         usbmount
kill_usbStorage_apps         vconfig
killall                      vmwigen
killsh.sh                    vnifdownup.sh
klogd                        voip_event
l2tp.sh                      voipbox
l2tpd                        voipcli
lb_test                      wait_dsp
led_ctrl                     watchdog
lld2d                        wc
ln                           wget
login                        wlanapp.sh
ls                           wscd

for 6-10 I will answer tomorrow when I will redo the dump. I think I didn't perform it the right way and only got the squashfs out if.

---------- Post updated 04-22-17 at 04:07 PM ---------- Previous update was 04-21-17 at 07:51 PM ----------

6. I think I saw Uboot mention while analyzing the dump of an older firmware. The newer firmware only dumps the squashfs, no longer bootloader or kernel
7. no ideea how to do that, sorry
8
Code:
dmesg
wlan1: Open and authenticated
wlan1: A wireless client is associated - E8:93:09:8B:0B:CD
wlan1: WPA2-AES PSK authentication in progress...
wlan1: A wireless client is associated - E8:93:09:8B:0B:CD
wlan1: Open and authenticated
wlan1: A wireless client is disassociated - 9C:B7:0D:86:19:C5
wlan1: A wireless client is associated - E8:93:09:8B:0B:CD
wlan1: WPA2-AES PSK authentication in progress...
wlan1: A wireless client is associated - E8:93:09:8B:0B:CD
wlan1: Open and authenticated
wlan1: A STA is expired - 0C:D7:46:91:61:CB
wlan1: A STA is expired - E8:93:09:8B:0B:CD
wlan1: A expired STA is resumed - 0C:D7:46:91:61:CB
wlan1: A STA is expired - 0C:D7:46:91:61:CB
wlan1: A wireless client is associated - E8:93:09:8B:0B:CD
wlan1: WPA2-AES PSK authentication in progress...
wlan1: A wireless client is associated - E8:93:09:8B:0B:CD
wlan1: Open and authenticated
wlan1: A wireless client is associated - E8:93:09:8B:0B:CD
wlan1: WPA2-AES PSK authentication in progress...
wlan1: A wireless client is associated - E8:93:09:8B:0B:CD
wlan1: Open and authenticated
wlan1: A wireless client is associated - 0C:D7:46:91:61:CB
wlan1: WPA2-AES PSK authentication in progress...
wlan1: A wireless client is associated - 0C:D7:46:91:61:CB
wlan1: Open and authenticated
wlan1: A wireless client is disassociated - 0C:D7:46:91:61:CB
wlan1: A wireless client is associated - 0C:D7:46:91:61:CB
wlan1: WPA2-AES PSK authentication in progress...
wlan1: A wireless client is associated - 0C:D7:46:91:61:CB
wlan1: Open and authenticated
wlan1: A wireless client is disassociated - 0C:D7:46:91:61:CB
wlan0: A wireless client is associated - 0C:D7:46:91:61:CB
wlan0: WPA2-AES PSK authentication in progress...
wlan0: A wireless client is associated - 0C:D7:46:91:61:CB
wlan0: Open and authenticated
wlan0: A wireless client is associated - 48:5A:3F:89:EA:F4
wlan0: WPA2-AES PSK authentication in progress...
wlan0: A wireless client is associated - 48:5A:3F:89:EA:F4
wlan0: Open and authenticated
wlan1: A wireless client is associated - 9C:B7:0D:86:19:C5
wlan1: WPA2-AES PSK authentication in progress...
wlan1: A wireless client is associated - 9C:B7:0D:86:19:C5
wlan1: Open and authenticated
wlan0: A wireless client is disassociated - 48:5A:3F:89:EA:F4
wlan1: A wireless client is disassociated - 9C:B7:0D:86:19:C5
wlan1: A wireless client is associated - 9C:B7:0D:86:19:C5
wlan1: WPA2-AES PSK authentication in progress...
wlan1: A wireless client is associated - 9C:B7:0D:86:19:C5
wlan1: Open and authenticated
ODM_TXPowerTrackingCallback_ThermalMeter_JaguarSeries2(437)
wlan1: A wireless client is associated - 9C:B7:0D:86:19:C5
wlan1: WPA2-AES PSK authentication in progress...
wlan1: A wireless client is associated - 9C:B7:0D:86:19:C5
wlan1: Open and authenticated
wlan1: A STA is expired - E8:93:09:8B:0B:CD

9. yes, usb is automounted as /dev/sda1
10. no

Last edited by apoklyps3; 04-21-2017 at 09:56 PM..
# 10  
Old 04-22-2017
ok.. i think test / try and lets see way is difficult and time consuming and also risky..
therefore can you execute the below commands and attachment the output files to me ? ( thanks. )
Code:
dd if=/dev/mtd0 of=/var/tmp/usb/sda1/bootl.bin
dd if=/dev/mtd1 of=/var/tmp/usb/sda1/linux1.bin

# 11  
Old 04-23-2017
there wasn't any /dev/mtd0 or 1 , but I think you meant /dev/mtdblock0 & 1
here are the files:
bl+lin.rar
thanks
# 12  
Old 04-24-2017
I'm not sure I'm going to be able to accomplish anything here.
I have made the modifications, but unfortunately the router is branded by the internet provider and there is no official support or any way to download the firmware.
the provider pushes new firmware and can't think of any way I could intercept it
i guess what I was dumping the squashfs only using cat /dev/mtd5 > /var/tmp/usb/sda1/backup1.bin command.
# 13  
Old 04-25-2017
Is it a router or actually a DSL modem? Reflashing a modem is something they're liable to notice and not appreciate.

If your model is compatible with OpenWRT, you can replace it outright by installing that. If there's no install procedure for it, it probably isn't.
# 14  
Old 04-25-2017
it's a router. couldn't care less if they apreciate it or not, I might just even disable their remote connection to it if I get my way.
Hopefuly I will intercept de next firmware and get what I need.
it's not openwrt compatible yet and I wouldn't flash it to that anyway , because it's a gigabit router and being closed source openwrt would come without hardware NAT , wich means only 100MBps speed limit.
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Expect script help needed- script failing if router unavailable

Hey all. Sometimes I'm tasked to change some router configs for the entire network (over 3,000 Cisco routers). Most of the time its a global config parameter so its done with a loop and an IP list as its the same configuration change for all routers. This is working OK. However, sometimes an... (3 Replies)
Discussion started by: mrkz1974
3 Replies

2. Cybersecurity

Help needed in IPTables firewall/router setup - Linux

HI all, I have setup IPTables firewall/Router and my home network, with address space 192.168.10.XXX Form my private network hosts, i can ping the gateway ( 192.168.10.101 ) , but the reverse is not happening. Can someone help me as of what i need to do, so that i can ping my private... (1 Reply)
Discussion started by: chandan_m
1 Replies

3. IP Networking

Linux Router?

I am trying to set up a linux box as a router, but I am a little confused on how to do this. I am using Red Hat 9.0 on a machine that has 2 nic cards. Also, I am using a DSL pppoe connection. I have installed rp-pppoe and I am connected to the internet via the pseudo pppoe interface. I have... (1 Reply)
Discussion started by: cstovall
1 Replies
Login or Register to Ask a Question