What's new

Custom firmware build for R7800 v. 1.0.2.74.2SF & v. 1.0.2.74.3SF

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

I reset my R7800 setting and installed .74.3SF.
I install Entware follow instruction in readme.
Code:
root@R7800:~$ mkfs.ext4 -L optware /dev/sda1
mke2fs 1.45.5 (07-Jan-2020)
/dev/sda1 contains a ext4 file system labelled 'hdd35'
        last mounted on Thu Jan  1 07:00:26 1970
Proceed anyway? (y,N) y
Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata and                                                                                                                                                              journal checksum features.
Creating filesystem with 122096384 4k blocks and 30531584 inodes
Filesystem UUID: 290a8fae-b920-4735-a118-3580aa949022
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000

Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done

root@R7800:~$ tune2fs -O ^metadata_csum,^64bit /dev/sda1
tune2fs 1.45.5 (07-Jan-2020)
Disabling checksums could take some time.
Proceed anyway (or wait 5 seconds to proceed) ? (y,N) y
Please run `resize2fs -s /dev/sda1' to disable 64-bit mode.
root@R7800:~$ cd /tmp/mnt/sda1
root@R7800:/tmp/mnt/sda1$ wget https://www.voxel-firmware.com/Downloads/Voxel/En                                                                                                                                                             tware/entware-cortex-a15-3x-initial-generic.tar.gz
--2020-03-01 07:30:59--  https://www.voxel-firmware.com/Downloads/Voxel/Entware/                                                                                                                                                             entware-cortex-a15-3x-initial-generic.tar.gz
Resolving www.voxel-firmware.com... 194.135.87.112
Connecting to www.voxel-firmware.com|194.135.87.112|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5536132 (5.3M) [application/x-gzip]
Saving to: 'entware-cortex-a15-3x-initial-generic.tar.gz'

entware-cortex-a15- 100%[===================>]   5.28M   651KB/s    in 9.7s

2020-03-01 07:31:12 (557 KB/s) - 'entware-cortex-a15-3x-initial-generic.tar.gz'                                                                                                                                                              saved [5536132/5536132]

root@R7800:/tmp/mnt/sda1$ tar -xzf entware-cortex-a15-3x-initial-generic.tar.gz
root@R7800:/tmp/mnt/sda1$ reboot
but after reboot there is NO entware directory like it should be
Code:
root@R7800:~$ ls -l /opt/*
-rw-r--r--    1 root     root          855 Jan  1  1970 /opt/filelist
-rw-r--r--    1 root     root            9 Jan  1  1970 /opt/version

/opt/kamoj:
drwxr-xr-x    3 root     root          232 Feb 22 14:37 addons

/opt/leafp2p:
-rwxr-xr-x    1 root     root       729056 Jan  1  1970 leafp2p

/opt/rcagent:
drwxr-xr-x    2 root     root          232 Jan  1  1970 cgi
-rwxr-xr-x    1 root     root       355008 Jan  1  1970 cgi_processor
-rwxr-xr-x    1 root     root        39044 Jan  1  1970 downloader
-rwxr-xr-x    1 root     root        11624 Jan  1  1970 nas_service
-rwxr-xr-x    1 root     root       213760 Jan  1  1970 rcagentd
-rwxr-xr-x    1 root     root          145 Jan  1  1970 run_server.sh
drwxr-xr-x    2 root     root          576 Jan  1  1970 scripts

/opt/remote:
-rwxr-xr-x    1 root     root        92208 Jan  1  1970 remote
-rwxr-xr-x    1 root     root        21124 Jan  1  1970 run_remote

/opt/xagent:
drwxr-xr-x    2 root     root          240 Jan  1  1970 certs
-rwxr-xr-x    1 root     root        39708 Jan  1  1970 genie_handler
-rwxr-xr-x    1 root     root          333 Jan  1  1970 run-xagent.sh
-rwxr-xr-x    1 root     root        84344 Jan  1  1970 xagent
-rwxr-xr-x    1 root     root        18428 Jan  1  1970 xagent_control
Please help me with this.

Thanks for reading!

You can try the command : "Please run `resize2fs -s /dev/sda1' to disable 64-bit mode." I have not seen the error, maybe you can try it.
 
Please try the following scheme:

Code:
mkfs.ext4 -L optware -O ^64bit /dev/sda1
tune2fs -O ^metadata_csum /dev/sda1

Voxel.
I start it all again. This time tune2fs work without error return. But still get no Entware installed.
Code:
root@R7800:~$ umount /mnt/sda1
root@R7800:~$ mkfs.ext4 -L optware -O ^64bit /dev/sda1
mke2fs 1.45.5 (07-Jan-2020)
/dev/sda1 contains a ext4 file system labelled 'optware'
        last mounted on Thu Jan  1 07:00:29 1970
Proceed anyway? (y,N) y
Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata and journal checksum features.
64-bit filesystem support is not enabled.  The larger fields afforded by this feature enable full-strength checksumming.  Pass -O 64bit to rectify.
Creating filesystem with 122096384 4k blocks and 30531584 inodes
Filesystem UUID: 355dfc9f-fae8-4c8b-88f3-9cd993db9cea
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
        102400000

Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done

root@R7800:~$ tune2fs -O ^metadata_csum /dev/sda1
tune2fs 1.45.5 (07-Jan-2020)
Disabling checksums could take some time.
Proceed anyway (or wait 5 seconds to proceed) ? (y,N) y
root@R7800:~$ cd /mnt/optware/
root@R7800:/tmp/mnt/sda1$ wget https://www.voxel-firmware.com/Downloads/Voxel/Entware/entware-cortex-a15-3x-initial-generic.tar.gz
--2020-02-22 14:39:24--  https://www.voxel-firmware.com/Downloads/Voxel/Entware/entware-cortex-a15-3x-initial-generic.tar.gz
Resolving www.voxel-firmware.com... 194.135.87.112
Connecting to www.voxel-firmware.com|194.135.87.112|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5536132 (5.3M) [application/x-gzip]
Saving to: 'entware-cortex-a15-3x-initial-generic.tar.gz'

entware-cortex-a15- 100%[===================>]   5.28M  1.39MB/s    in 3.8s

2020-02-22 14:39:29 (1.39 MB/s) - 'entware-cortex-a15-3x-initial-generic.tar.gz' saved [5536132/5536132]

root@R7800:/tmp/mnt/sda1$ tar -xzf entware-cortex-a15-3x-initial-generic.tar.gz
root@R7800:/tmp/mnt/sda1$ ls
autorun
entware
entware-cortex-a15-3x-initial-generic.tar.gz
after reboot
Code:
 ls –l /opt/*
ls: –l: No such file or directory
/opt/filelist  /opt/version

/opt/kamoj:
addons

/opt/leafp2p:
leafp2p

/opt/rcagent:
cgi            downloader     rcagentd       scripts
cgi_processor  nas_service    run_server.sh

/opt/remote:
remote      run_remote

/opt/scripts:
firewall-start.sh

/opt/xagent:
certs           run-xagent.sh   xagent_control
genie_handler   xagent
 
I start it all again. This time tune2fs work without error return. But still get no Entware installed.

Try to run manually from telnet/ssh console:

Code:
/mnt/optware/autorun/scripts/post-mount.sh sda1

i.e. what it displays.

Voxel.
 
Try to run manually from telnet/ssh console:

Code:
/mnt/optware/autorun/scripts/post-mount.sh sda1

i.e. what it displays.

Voxel.
I run it all from putty (ssh)
Code:
ls –l /opt/*
ls: –l: No such file or directory
/opt/filelist  /opt/version

/opt/kamoj:
addons

/opt/leafp2p:
leafp2p

/opt/rcagent:
cgi            downloader     rcagentd       scripts
cgi_processor  nas_service    run_server.sh

/opt/remote:
remote      run_remote

/opt/scripts:
firewall-start.sh

/opt/xagent:
certs           run-xagent.sh   xagent_control
genie_handler   xagent
root@R7800:~$ /mnt/optware/autorun/scripts/post-mount.sh sda1
-ash: /mnt/optware/autorun/scripts/post-mount.sh: not found
 
root@R7800:/tmp/mnt/sda1$ tar -xzf entware-cortex-a15-3x-initial-generic.tar.gz
root@R7800:/tmp/mnt/sda1$ ls
autorun
entware
entware-cortex-a15-3x-initial-generic.tar.gz

root@R7800:~$ /mnt/optware/autorun/scripts/post-mount.sh sda1 -ash: /mnt/optware/autorun/scripts/post-mount.sh: not found

Something is contradictory. Check that /mnt/optware/autorun/scripts/post-mount.sh is not there.

Code:
ls -al /mnt/sda1
ls -al /mnt/sda1/autorun
ls -al /mnt/sda1/autorun/scripts

Voxel.
 
Something is contradictory. Check that /mnt/optware/autorun/scripts/post-mount.sh is not there.

Code:
ls -al /mnt/sda1
ls -al /mnt/sda1/autorun
ls -al /mnt/sda1/autorun/scripts

Voxel.
I start it all from scratch
Factory reset, flash firmware, setup ssh, kamoj addons, install Entware.
still nothing in there after reboot
Code:
root@R7800:~$ ls -l /opt/*
-rw-r--r--    1 root     root          855 Jan  1  1970 /opt/filelist
-rw-r--r--    1 root     root            9 Jan  1  1970 /opt/version

/opt/kamoj:
drwxr-xr-x    3 root     root          232 Feb 22 14:37 addons

/opt/leafp2p:
-rwxr-xr-x    1 root     root       729056 Jan  1  1970 leafp2p

/opt/rcagent:
drwxr-xr-x    2 root     root          232 Jan  1  1970 cgi
-rwxr-xr-x    1 root     root       355008 Jan  1  1970 cgi_processor
-rwxr-xr-x    1 root     root        39044 Jan  1  1970 downloader
-rwxr-xr-x    1 root     root        11624 Jan  1  1970 nas_service
-rwxr-xr-x    1 root     root       213760 Jan  1  1970 rcagentd
-rwxr-xr-x    1 root     root          145 Jan  1  1970 run_server.sh
drwxr-xr-x    2 root     root          576 Jan  1  1970 scripts

/opt/remote:
-rwxr-xr-x    1 root     root        92208 Jan  1  1970 remote
-rwxr-xr-x    1 root     root        21124 Jan  1  1970 run_remote

/opt/scripts:
-rw-r--r--    1 root     root           75 Mar  1 10:32 firewall-start.sh

/opt/xagent:
drwxr-xr-x    2 root     root          240 Jan  1  1970 certs
-rwxr-xr-x    1 root     root        39708 Jan  1  1970 genie_handler
-rwxr-xr-x    1 root     root          333 Jan  1  1970 run-xagent.sh
-rwxr-xr-x    1 root     root        84344 Jan  1  1970 xagent
-rwxr-xr-x    1 root     root        18428 Jan  1  1970 xagent_control
root@R7800:~$ ls -al /mnt/sda1
drwxr-xr-x    3 root     root         4096 Mar  3 17:27 .
drwxr-xr-x    4 root     root          100 Jan  1  1970 ..
drwx------    2 root     root        16384 Mar  3 17:27 lost+found
 
I start it all from scratch
Factory reset, flash firmware, setup ssh, kamoj addons, install Entware.
still nothing in there after reboot

You did not answer, what is the results of commands:
Code:
ls -al /mnt/sda1
ls -al /mnt/sda1/autorun
ls -al /mnt/sda1/autorun/scripts
after installation of Entware.

My results of "ls -al /mnt/sda1/autorun/scripts":
Code:
drwxr-xr-x    2 root     root         4096 Aug  2  2017 .
drwxr-xr-x    3 root     root         4096 Aug  2  2017 ..
-rwxr-xr-x    1 root     root         2244 Feb  7 15:29 post-mount.sh

I.e. there is post-mount.sh script and it is executable. Yours?

Voxel.
 
Code:
root@R7800:~$ ls -al /mnt/sda1
drwxr-xr-x    3 root     root         4096 Mar  3 17:27 .
drwxr-xr-x    4 root     root          100 Jan  1  1970 ..
drwx------    2 root     root        16384 Mar  3 17:27 lost+found
root@R7800:~$ ls -al /mnt/sda1/autorun
ls: /mnt/sda1/autorun: No such file or directory
root@R7800:~$ ls -al /mnt/sda1/autorun/scripts
ls: /mnt/sda1/autorun/scripts: No such file or directory
There is no autorun, script or post-mount.sh
Nothing but lost+found that I quote in latest post.
I stick to your instruction step by step.

fyi: I test it with a 2TB and a 500GB HDD. Both failed.
I used to installed Entware successfully on .74.1SF at once just follow your readme.
 
It is quote (Copy/Paste) from your post:

root@R7800:/tmp/mnt/sda1$ tar -xzf entware-cortex-a15-3x-initial-generic.tar.gz
root@R7800:/tmp/mnt/sda1$ ls
autorun
entware
entware-cortex-a15-3x-initial-generic.tar.gz

There were autorun and entware and entware-cortex-a15-3x-initial-generic.tar.gz. So let us step-by-step:

(1)
Code:
mkfs.ext4 -L optware -O ^64bit /dev/sda1
tune2fs -O ^metadata_csum /dev/sda1
sync
reboot

(2)
Code:
cd /mnt/sda1
wget https://www.voxel-firmware.com/Downloads/Voxel/Entware/entware-cortex-a15-3x-initial-generic.tar.gz
tar xf entware-cortex-a15-3x-initial-generic.tar.gz
ls -al
sync
reboot

(3)
Code:
ls -al /mnt/sda1
ls -al /mnt/sda1/autorun
ls -al /mnt/sda1/autorun/scripts

And sent me output of these steps.

Voxel.
 
This time it works.
Entware directories are finally shown up (bin, usr, share, var etc.)
The difference from last time is running 'sync' and 'reboot' before run 'tar' command (without -z option)

Thank you very much for your support.
 
Last edited:
The difference from last time is running 'sync' and 'reboot' before run 'tar' command (without -z option)

"-z" is not obligatory when using tar from firmware...

You know, "sync" was just for safety. Not obligatory. "reboot": just to avoid manual mount of your disk after format...

Voxel.
 
I am trying to host a node.js application on port 80 on my r7800
I've changed /etc/init.d/uhttpd to only listen on ssl port 443

I am running the node.js on port 80.
I can succesfully connect to the node.js app when i connect from my local network.
I tested this by wget "http://{public-ip}/" and the index.htm gets downloaded.

I've added a rule to the net-wall conf to open port 80
ACCEPT net fw tcp 80

When i do a portscan from a remote connection port 80 is open

I can't connect to the nodejs.app when i connect from a remote network to the public ip address of the router.
When i test this by wget "http://{public-ip}/" i get a time out.

netstat -tulpn | grep -E "80|443", shows node and uhttpd listening.

tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 14846/uhttpd
tcp 0 0 :::80 :::* LISTEN 14923/node
tcp 0 0 :::8082 :::* LISTEN 14923/node
tcp 0 0 :::443 :::* LISTEN 14846/uhttpd

I probably dont understand iptables enough to succesfully set this up.
To help diagnosing the problem, i would like to log iptables rule .

The default iptables in this firmware has no LOG option
I installed the optware package iptables , it has LOG option
Would i be able to replace the /bin/iptables with /opt/bin/iptables?
Would this allow me to use -j LOG option of iptables?

Would these mesages show up in /var/log/messages?

Do i need to modify /etc/init.d/boot and /etc/init.d/syslogd and set loglevel to 8 on both klogd -c 8 and syslogd -l 8 to get the kernel to output these messages?

What iptables rules would i need to allow connection to node.js through the firewall ?

ps these are my iptables -L output of net2fw.

Chain net2fw (1 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
DROP tcp -- anywhere anywhere state NEW tcp flags:!FIN,SYN,RST,PSH,ACK,URG/SYN
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:www
ACCEPT udp -- anywhere anywhere state NEW multiport dports 520,5050
ACCEPT udp -- anywhere anywhere state NEW multiport dports snmp,snmp-trap
DROP tcp -- anywhere anywhere state NEW multiport dports echo,chargen,135
DROP udp -- anywhere anywhere state NEW multiport dports echo,discard,chargen,netbios-
ns,netbios-dgm,netbios-ssn,microsoft-ds
ACCEPT tcp -- anywhere anywhere tcp dpt:https
net2all all -- anywhere anywhere
 
Last edited:
The default iptables in this firmware has no LOG option
I installed the optware package iptables , it has LOG option
Would i be able to replace the /bin/iptables with /opt/bin/iptables?
Would this allow me to use -j LOG option of iptables?

Please check my README re: custom iptables rules (/opt/scripts/firewall-start.sh)

I.e. how to apply your iptables rules in my build.

Voxel.
 
Please check my README re: custom iptables rules (/opt/scripts/firewall-start.sh)

I.e. how to apply your iptables rules in my build.

Voxel.

Hello Voxel, thanks for your reply,

To gain acces to the LOG target of iptables.
I've linked the binary for the optware version of iptables, with LOG target support over the firmware version.
I did this, by creating a symlink in /overlay/usr/sbin for iptables to /opt/usr/sbin/iptables

lrwxrwxrwx 1 root root 18 Mar 5 16:33 iptables -> /opt/sbin/iptables

I am starting to see logging of iptables to /var/log/messages now.
This should help me in resolving the configuration of iptable rules.

I've read the README.md and have seen that you can specify rules in netwall.conf, when you specify LOG there it does not work.

I will try the /opt/scripts/firewall-start-sh method.

Thanks for your advice, and you great work on the R7800 firmware.
 
I've read the README.md and have seen that you can specify rules in netwall.conf, when you specify LOG there it does not work.
This will NOT work. NG uses direct settings in firewal w/o iptables.

I will try the /opt/scripts/firewall-start-sh method.
Yes, I mean exactly this way. But not "/opt/scripts/firewall-start-sh". /opt/scripts/firewall-start.sh

Voxel.
 
Hello Voxel,
I wanted to thank you again for your help in solving my issue with iptables.
Now i got another issue that i am being DDOSSED :confused:,
but that is none of your concern. Your build is holding up like a charm:)!

<<
individual ddos attacks
875 /opt/var/log/combined
individual ddos drones
226 /opt/var/log/totalled
>>
 
Hello Voxel,
I wanted to thank you again for your help in solving my issue with iptables.
Now i got another issue that i am being DDOSSED :confused:,
but that is none of your concern. Your build is holding up like a charm:)!

<<
individual ddos attacks
875 /opt/var/log/combined
individual ddos drones
226 /opt/var/log/totalled
>>

How did you get the DDOS summary report you posted?

I have my Voxel firmware based 7800 auto email me its logs everyday. I noticed I was getting numerous DOS attacks in succession recently. However, the DOS attacks are listed separately as opposed to the summary you posted.
 
Hi @Voxel I've noticed that your firmware also include aMule and was wondering whether it runs in background and in case, how do I stop it ?

Tia.
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top