What's new

Kamoj Kamoj Add-on Beta testing

  • 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!

Hi Kamoj and Voxel
First thanks for the work in creating great alterations to the Netgear firmware
I am new to Netgear and normally would have put DD-WRT on it had I not found your modifications
I do have a request if I may - Unless I am missing something there does not appear to be any way in switching off port forwards within the r7800
I have a few port forwards set up but they are not needed all the time and would like to be able to switch off the ones that are temporarily not used
The only way to do this at the moment seems to be to delete and then recreate again
I have checked other Netgear router manuals and they seem to indicate this is possible but does not appear to be implemented in this router (unless I have completely missed it !)

Is this something you can modify/edit/create and then make it available within/via your modifications ?

Best regards

Ern
 
I have no such implementation yet.
But you easily do it yourself.
I've added this to the FAQ.txt:

Q: Is it possible to preserve only port forwarding without backup/restore of the whole configuration?
A: Yes. You can do it using shell commands (example where you have a USB-device mounted as sda1):
#Show all:
Bash:
nvram show | grep forwarding[0-9]
#Backup:
# Insert a USB-device, and check what it is mounted as, e.g. /tmp/mnt/sda1
Code:
nvram show | grep forwarding[0-9] >/tmp/mnt/sda1/forwarding.txt

#Delete all forwarding:
Bash:
nvram show | grep forwarding[0-9] | xargs -n1 nvram unset; nvram commit
net-wall restart
#Restore:
# Insert a USB-device, and check what it is mounted as, e.g. /tmp/mnt/sda1
Bash:
while IFS="=" read -r P V; do nvram set "$P"="$V"; done </tmp/mnt/sda1/forwarding.txt; nvram commit
net-wall restart

Hi Kamoj and Voxel
First thanks for the work in creating great alterations to the Netgear firmware
I am new to Netgear and normally would have put DD-WRT on it had I not found your modifications
I do have a request if I may - Unless I am missing something there does not appear to be any way in switching off port forwards within the r7800
I have a few port forwards set up but they are not needed all the time and would like to be able to switch off the ones that are temporarily not used
The only way to do this at the moment seems to be to delete and then recreate again
I have checked other Netgear router manuals and they seem to indicate this is possible but does not appear to be implemented in this router (unless I have completely missed it !)

Is this something you can modify/edit/create and then make it available within/via your modifications ?

Best regards

Ern
 
Last edited:
I have no such implementation yet.
But you easily do it yourself.
I've added this to the FAQ.txt:

Q: Is it possible to preserve only port forwarding without backup/restore of the whole configuration?
A: Yes. You can do it using shell commands (example where you have a USB-device mounted as sda1):
#Show all:
Bash:
nvram show | grep forwarding[0-9]
#Backup:
# Insert a USB-device, and check what it is mounted as, e.g. /tmp/mnt/sda1
Code:
nvram show | grep forwarding[0-9] >/tmp/mnt/sda1/forwarding.txt

#Delete all forwarding:
Bash:
nvram show | grep forwarding[0-9] | xargs -n1 nvram unset; nvram commit
reboot
#Restore:
# Insert a USB-device, and check what it is mounted as, e.g. /tmp/mnt/sda1
Bash:
while IFS="=" read -r P V; do nvram set "$P"="$V"; done </tmp/mnt/sda1/forwarding.txt; nvram commit
reboot

Hi Kamoj
Thanks for the info
I feel its a bit too complex for my needs though. But great to see a way of backing up and reinstalling all of the port forwards
It would be quicker for me to delete the 2/3 unneeded port forwards and then inputting them again when required rather than go through a shell log in and reboot process etc - I guess I was hoping there were hidden switches already within the settings and that Netgear had just not fully implemented/enabled them on the r7800

Regards Ern
 
the reboot isn't needed though. A simple "net-wall restart" is already sufficient to read the changes.

So this could be handy if you'd want to enable / disable stuff on a schedule. (via cronjobs)

But it would have been nice if GUI would have checkboxes in front of the port-forwardings, so that you could simply enable / disable them.
 
Changes in kamoj-addon beta version 5.4b9
--------------------------------------------------
- Settings: Added: Reserved default cron job "aegis update"
- Restart Supervision: Added "[SUPERVISON]"-log when internet down
- Restart Supervision: Added: Logging last 90 seconds of syslog when internet down
- System Information: Added: softirqs
- System Information: Added: WiFi Thermal config and stats
- System Information: Added: Bridge Information
- System Information: Added: arp table
- System Information: Added: Access Point statistics
- System Information: Fixed: cron jobs
- General: Maximized log-files to 10 Mb + 10 Mb roll-back .bak file.
- Minor fixes
- FAQ.txt : Updated

Changes in kamoj-addon beta version 5.4b8
--------------------------------------------------
- Hidden Menu: Fixed "Aegis" link
- Advanced: Administration: Logs: Enabled these log alternatives for R9000:
+ Automatic Internet connection reset
+ ReadySHARE Mobile Connect
- Restart Supervision: Delay after each trig: 31 -> 11 seconds
- Restart Supervision: Make one last ping with increase timeout (5 sec) when all have failed.
- AdGuard Home: Improved (delayed) install and start when no Internet at router boot time
- AdGuard Home: Enabled Safesearch and Safebrowsing
- AdGuard Home: Changed from parallel requests to load balancing (@ern)
- Settings: Added: R9000: Set antenna LEDs off
- Settings: Router Internals: Added info about log file names
- Settings: Router Internals: Changed order of dmesg, OS Log, System and Console Log
- Settings: "Router Internals" changed to "System Information"
- Settings: Split into "Settings" and "System Information"
 
Hi @kamoj

I installed 5.4b9. Here is the Telnet conversation:

root@R7800:/tmp/mnt/sda$ /bin/opkg install -V1 --force-overwrite kamoj-addon_201109-233555-5.4b9_ipq806x.ipk
Installing kamoj-addon (201109-233555-5.4b9) to root...
Configuring kamoj-addon.
ls: /var/logs/kamoj.log: No such file or directory
-----------------------------------
--- INFO: kamoj-addon installed ---
--- PLEASE, YOU MUST REBOOT NOW ---
-----------------------------------
root@R7800:/tmp/mnt/sda$
root@R7800:/tmp/mnt/sda$ reboot

I have bolded one line. Is it problematic that there is no kamoj log?

I noticed one other thing. When I upgraded from b6 to b7, the accumulated data for Bandwidth Usage was not lost. However, when I upgraded from b7 to b9, it started at "0" again. Which is the correct behavior?

Thank you
 
  • Like
Reactions: KW.
Thank you for your report!
I'll fix the error message to next release.

The Bandwidth usage should survive as before. I can not explain that.
Maybe you used another USB-device to install from,
where the Bandwidth data base was not backed up to?
If so, you can insert the "other" usb device and copy the .db file to
internal ram, e.g.:
Code:
\cp  /mnmt/sda1/addon_bwusage.db  /tmp/addons/addon_bwusage/backupdir/addon_bwusage.db
and/or to root of the other usb device.

Hi @kamoj

I installed 5.4b9. Here is the Telnet conversation:

root@R7800:/tmp/mnt/sda$ /bin/opkg install -V1 --force-overwrite kamoj-addon_201109-233555-5.4b9_ipq806x.ipk
Installing kamoj-addon (201109-233555-5.4b9) to root...
Configuring kamoj-addon.
ls: /var/logs/kamoj.log: No such file or directory
-----------------------------------
--- INFO: kamoj-addon installed ---
--- PLEASE, YOU MUST REBOOT NOW ---
-----------------------------------
root@R7800:/tmp/mnt/sda$
root@R7800:/tmp/mnt/sda$ reboot

I have bolded one line. Is it problematic that there is no kamoj log?

I noticed one other thing. When I upgraded from b6 to b7, the accumulated data for Bandwidth Usage was not lost. However, when I upgraded from b7 to b9, it started at "0" again. Which is the correct behavior?

Thank you
 
Last edited:
@Jack Yaz there's competition for 'Coding at the speed of light' in them thar hills. :D

@kamoj I've always wondered what you could do for the RMerlin/amtm scripting crowd. :) :) :)
 
@kamoj, just lucky (mostly). But I love to read! I just wish I fully understood half of what I devour daily. ;)

Reading the whole forum daily gives me some great insights, if not more questions for me to tackle daily. :)
 
@Jack Yaz just a 'lowly userspace script kid'? Where do I get a Diploma in that! :)
 
The Bandwidth usage should survive as before. I can not explain that.
Maybe you used another USB-device to install from,
where the Bandwidth data base was not backed up to?
If so, you can insert the "other" usb device and copy the .db file to
internal ram, e.g.:
Code:
\cp  /mnmt/sda1/addon_bwusage.db  /tmp/addons/addon_bwusage/backupdir/addon_bwusage.db
and/or to root of the other usb device.
Hi Kamoj,

Thank you for your very fast response. I installed b10, and this time there was no lost of bandwidth usage data, even though I made no changes in my installation procedure. I have continuously used the same thumb drive; no changes there. I looked at the files on the thumb drive, and the file "addon_bwusage.db" does exist, though the time and date is 9Nov2020 ; 23h44, over 10 hours ago.

FWIW, I looked at /tmp/addons/addon_bwusage/backupdir/ and it contained no files. I modified your script (correcting a typo; and changing the drive designation) and backed up addon_bwusage.db before I upgraded to b10. I don't know whether this had any impact upon my results.
Code:
\cp /mnt/sda/addon_bwusage.db  /tmp/addons/addon_bwusage/backupdir/addon_bwusage.db
Does addon_bwusage.db backup automatically to the thumb drive? On what schedule?

Thanks for your help.
 
It's backed up every 11th minute with a cron job. You can see it in cron jobs.
Example:
/tmp/addons/cron/addon_bwusage_backup/crontabs:
*/11 * * * * [ -s /tmp/addons/addon_bwusage/addon_bwusage.db ] && \cp /tmp/addons/addon_bwusage/addon_bwusage.db /tmp/mnt/sda1 && sync

Does addon_bwusage.db backup automatically to the thumb drive? On what schedule?
 
Wow, my installs can't keep up with the versions...you are fast Kamoj! Well, here goes, going to have some fun and install the latest version!

Thanks,
BL
 
It's backed up every 11th minute with a cron job. You can see it in cron jobs.
Example:
/tmp/addons/cron/addon_bwusage_backup/crontabs:
*/11 * * * * [ -s /tmp/addons/addon_bwusage/addon_bwusage.db ] && \cp /tmp/addons/addon_bwusage/addon_bwusage.db /tmp/mnt/sda1 && sync
Hi Kamoj,

I'm learning how your addon is constructed, one small step at a time. ;-)

While you gave me the following code:
Code:
\cp  /mnt/sda/addon_bwusage.db  /tmp/addons/addon_bwusage/backupdir/addon_bwusage.db
when I examine the cron jobs, I see that none of them use the /tmp/addons/addon_bwusage/backupdir (though it exists). They place addon_bwusage.db in /tmp/addons/addon_bwusage. Further, they copy/sync addon_bwusage.db to /tmp/mnt/sdb1, and while I have a thumb drive in sdb1 at the moment (and the file addon_bwusage.db exists on it) , I have not always had a drive in sdb1 (in fact, I only added it 2 days ago).

It appears that there is very precise criteria for external drives to make it all work properly (I hope that I am now configured correctly), but if it is mentioned in the Readme.txt or the FAQ, I can't find it.

If I read the cron jobs correctly, the addon_bwusage.db is backed up every 11 minutes, but the update of addon_bwusage.db is every 2 minutes for peak and every 30 minutes for offpeak. This helps explain other anomalies I couldn't understand.

As always, thank you for your help.
 
Hi Kamoj,

When I accessed Bandwidth Usage this morning, the note at the bottom indicates that the page was generated at 02h00 today (it is now 06h49). 02h00 is consistent with the "Last Seen" times as well. Reloading the page doesn't force an update.

So I went to System Information | Cron Jobs and it seems that all of the Bandwidth Usage cron jobs have disappeared. This is the current output:

Code:
/tmp/etc/crontabs: 
0 2 * * * * wlan apscan 
52 04 * * * streamboost update_fmn; streamboost auto_upload; streamboost auto_update && streamboost restart

What happened? I need your guidance again, please.
 

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