Coder Social home page Coder Social logo

negan07 / ancistrus Goto Github PK

View Code? Open in Web Editor NEW
66.0 13.0 17.0 497.67 MB

Netgear's D7000 Nighthawk Router Experience Distributed Project

Home Page: https://negan07.github.io/ancistrus/

License: GNU General Public License v2.0

Shell 25.03% Makefile 14.67% C 9.76% HTML 45.01% JavaScript 4.78% CSS 0.75%
netgear nighthawk router d7000 buffer-bloat speedtest qos broadcom sqm openvpn

ancistrus's Introduction

ancistrus

Netgear's D7000 (V1) Nighthawk Router Experience Distributed Project

https://github.com/negan07/ancistrus

License: GPLv2

This distributed project has the purpose of improving:

a) the embedded software developing experience;

b) the router performances, ability and reliability.

The word 'distributed' is intended with the same meaning of the git developing system philosophy.

People are a resource: any knowledge contribution is appreciated.

The approach is typical learn-to-learn oriented: feel free to join.

Note that this repository is related to Netgear D7000 (V1) revision only.

D7000 (V2) revision has different architecture and toolset and compatibility is avoided at all.

ancistrus's People

Contributors

negan07 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ancistrus's Issues

IOS Genie App local login failure on monolithic firmware

With the latest 526 firmware the Genie app does not work properly anymore, always reports "wrong password".
I tried to reset it several times and reinstall the official 1.0.1.70 version and the app works correctly.
Someone I encountered the same problem?

email failed 500 unrecognized command

New to ancistrus having installed to my D7000 on 9-July, and every night since at 0100a when logs get emailed, the log shows many dozens of these:

[email failed] 500 unrecognized command Tuesday, July 09,2019 01:00:07

The log does get sent-out, so this is only a nuisance but I wonder if anyone here knows what about the ancistrus firmware might cause this. Of course, the Netgear firmware did not.

I have tried other email addresses/servers/settings but only one actually works to send-out the log, so I couldn't make it go away using a different set of creds.

Web GUI buttons not working

When pressing buttons on the Package Manager (or anywhere else on the custom web gui) it shows
an error similar or exactly like this in browser console:

Uncaught ReferenceError: AncstdAction is not defined
at HTMLInputElement.onclick (anc.cgi?next_file=opkg.htm:73)

not sure what to do about this..

snr not change

hello the commands for editing snr via telnet do not work typing:

nvram set anc_snrtweak_enable = 1
nvram set snr = xx (example 25)
but any result and router restart with old snr;
with command xdslctl configure --snr = xx (example 25)
same result, router restart but snr does not change.
Any idea? Thank

D7000 V2

Was about to install and realised that I have a V2 router. I assume that it's very different.

Any chance you can work on that for a bounty. Please email me? My email address is [email protected].

ZIP package

Firstly I just want to say a big thanks for your work!

This is not really an issue, but in order to unpack the downloaded firmware sources, the package zip is required.

Maybe you can just add "sudo apt-get install zip" in script/hostprepare.sh

(I installed debian with the netinstall iso file, maybe on the full ISO / VMWare image is installed by default)

Source compiling errors

Hi, i'm trying to make build 195 by my self but compilation don't finish.
here is where it stop:

Downloading file:///home/user/ancistrus/build/Packages.gz.
Updated source 'local'.
Package nvram (0.1.0) installed in root is up to date.
Package utelnetd (0.1.11) installed in root is up to date.
Package iproute2 (4.10.0) installed in root is up to date.
Package hdparm (9.52) installed in root is up to date.
Package openvpn (2.4.4) installed in root is up to date.
Package ancistrus-core (0.1.0) installed in root is up to date.
Package netperf (2.7.0) installed in root is up to date.
Package network-test (0.1.0) installed in root is up to date.
Package qos-sqm (0.1.0) installed in root is up to date.
Package opkg (0.3.4) installed in root is up to date.
Package smartmontools (6.5) installed in root is up to date.
mv: cannot stat '/home/user/ancistrus/D7000_V1.0.1.50_WW_src/Source/target/usr/lib/opkg/*': No such file or directory
Makefile:96: recipe for target 'monolithic' failed
make[2]: *** [monolithic] Error 1
Makefile:87: recipe for target 'third-party' failed
make[1]: *** [third-party] Error 2
Makefile:44: recipe for target 'source' failed
make: *** [source] Error 2
Makefile:32: recipe for target 'sources' failed
make: *** [sources] Error 2

i haven't done any modification yet
Another thig i've changed shell from dash to bash to solve other compilation problem
Thanks

SSH Access Denied with the correct password (#454)

Hi everyone,
I installed build #454 a day ago and everything works perfectly except for ssh.
I state that it is the first time I try to connect in ssh always being connected in telnet and web interface.
And trying to connect I noticed that although I put the correct password (the same of the web interface) with the user 'root' but continues to return "Access Denied" (the problem is the same also with 'admin' user).
Has anyone already encountered this problem?

Thanks for collaboration.

MiniSNMP Config misses network intf

Just updated to the new monolithic image from my previous manually updated copy, turned on minisnmp through the webui and it doesn't seem to be reading any network interfaces.

previous conversation: #22

snmpwalk details:

snmpwalk -v2c -c public 192.168.0.1 .
SNMPv2-MIB::sysDescr.0 = STRING: router
SNMPv2-MIB::sysObjectID.0 = OID: SNMPv2-SMI::enterprises
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (7884) 0:01:18.84
SNMPv2-MIB::sysContact.0 = STRING: -i
SNMPv2-MIB::sysName.0 = STRING: D7000
SNMPv2-MIB::sysLocation.0 = STRING: here
HOST-RESOURCES-MIB::hrSystemUptime.0 = Timeticks: (28841) 0:04:48.41
UCD-SNMP-MIB::memTotalReal.0 = INTEGER: 227428 kB
UCD-SNMP-MIB::memAvailReal.0 = INTEGER: 88820 kB
UCD-SNMP-MIB::memShared.0 = INTEGER: 0 kB
UCD-SNMP-MIB::memBuffer.0 = INTEGER: 0 kB
UCD-SNMP-MIB::memCached.0 = INTEGER: 26404 kB
UCD-SNMP-MIB::dskIndex.1 = INTEGER: 1
UCD-SNMP-MIB::dskPath.1 = STRING: /mnt/shares
UCD-SNMP-MIB::dskTotal.1 = INTEGER: 0
UCD-SNMP-MIB::dskAvail.1 = INTEGER: 0
UCD-SNMP-MIB::dskUsed.1 = INTEGER: 0
UCD-SNMP-MIB::dskPercent.1 = INTEGER: 0
UCD-SNMP-MIB::dskPercentNode.1 = INTEGER: 0
UCD-SNMP-MIB::laIndex.1 = INTEGER: 1
UCD-SNMP-MIB::laIndex.2 = INTEGER: 2
UCD-SNMP-MIB::laIndex.3 = INTEGER: 3
UCD-SNMP-MIB::laNames.1 = STRING: Load-1
UCD-SNMP-MIB::laNames.2 = STRING: Load-5
UCD-SNMP-MIB::laNames.3 = STRING: Load-15
UCD-SNMP-MIB::laLoad.1 = STRING: 0.16
UCD-SNMP-MIB::laLoad.2 = STRING: 0.48
UCD-SNMP-MIB::laLoad.3 = STRING: 0.26
UCD-SNMP-MIB::laConfig.1 = STRING: 1
UCD-SNMP-MIB::laConfig.2 = STRING: 5
UCD-SNMP-MIB::laConfig.3 = STRING: 15
UCD-SNMP-MIB::laLoadInt.1 = INTEGER: 16
UCD-SNMP-MIB::laLoadInt.2 = INTEGER: 48
UCD-SNMP-MIB::laLoadInt.3 = INTEGER: 26
UCD-SNMP-MIB::ssCpuRawUser.0 = Counter32: 437
UCD-SNMP-MIB::ssCpuRawNice.0 = Counter32: 22
UCD-SNMP-MIB::ssCpuRawSystem.0 = Counter32: 9847
UCD-SNMP-MIB::ssCpuRawIdle.0 = Counter32: 4294948724
UCD-SNMP-MIB::ssRawInterrupts.0 = Counter32: 0
UCD-SNMP-MIB::ssRawContexts.0 = Counter32: 0
UCD-SNMP-MIB::ssRawContexts.0 = No more variables left in this MIB View (It is past the end of the MIB tree)

xdslctl profile

Looking at the dsl parameters tweaking.

Should be useful to have boundary conditions for both VDSL(PTM)/ADSL(ATM) connection modes.

The console output of the command:

xdslctl profile --show

VDSL(PTM) got.

Still needed ADSL(ATM)

Someone still under ADSL(ATM) can please write here the result of the command above. Thanks in advance.

Restart stuck (build 195)

When push on web GUI restart system or start the system for the first time ,router stuck with 1 and 2 LED ETH on for more and more minute.
Some time the restart go OK, but it is long (with 1 and 2 LED ETH ON)
I'm not only, in the forum (hwupgrade.it) there are others member .
And if the power fails and we are not at home?

Anyway, you did a great job.
Many thanks

VLAN Tagging Wifi

Hi Negan, looking to see if you can help.

I'm trying to figure out if I can vlan tag the Guest WiFi on the D7000. Currently it's setup as an Access Point, connected to my Ubiquiti USG LAN 1. I want to tag Guest network so I can pass that to the guest portal on my controller.

Looking on the D7000, I can see a utility vlanctl, but haven't found any available documentation online.

root@D7000:~$ vlanctl --help


VLAN Control Utility:

::: Usage:

vlanctl

        --if <if_name> Sets the target Interface of a composite vlanctl command to <if_name>.

        --rx Sets the direction of a composite vlanctl command to RECEIVE

        --tx Sets the direction of a composite vlanctl command to TRANSMIT

        --tags <nbr_of_tags> Sets the number of tags of a composite vlanctl command to <nbr_of_tags>

        --if-create <real_if_name> <if_index> Creates a new VOPI named <real_if_name>.v<if_index> and attaches it to the real device
         <real_if_name>. For instance, if this command were executed for the eth0 real interface and the VOPI interface index were
         set to 3, the resulting interface would have been named eth0.v3.

        --if-create-name <real_if_name> <vlan_if_name> Creates a new VOPI named <vlan_if_name> and attaches it to the real device

        --if-delete <vlan_if_name> Destroy the VOPI named <vlan_if_name>.

        --rule-append Inserts a new Tagging Rule as the last rule of the specified Tagging Rule Table. Dependencies: --if, --rx or
         --tx, and --tags.

        --rule-insert-before <rule-id> Inserts a new Tagging Rule before the Tagging Rule whose identifier matches <rule-id> in the
        specified Tagging Rule Table. Dependencies: --if, --rx or --tx, and --tags.

        --rule-insert-after <rule-id> Inserts a new Tagging Rule after the Tagging Rule whose identifier matches <rule-id> in the
        specified Tagging Rule Table. Dependencies: --if, --rx or --tx, and --tags.

        --rule-remove <rule-id> Removes the Tagging Rule that matches <rule-id> from the specified Tagging Rule Table. Dependencies:
        --if, --rx or --tx, and --tags.

        --rule-remove-all <real_if_name> <vlan_if_name> Removes all the Tagging Rules for the vlan device. 

        --show-table Lists all Tagging Rules stored in the specified Tagging Rule Table. Dependencies: --if, --rx or --tx, and
        --tags.

        --default-tpid <tpid> Sets the default TPID value of a tagging rule table to <tpid>. When a table is created, its default
        TPID value is set to 0x8100. Dependencies: --if, --rx or --tx, and --tags.

        --default-pbits <pbits> Sets the default PBITS value of a tagging rule table to <pbits>. When a table is created, its 
        default PBITS value is set to 0. Dependencies: --if, --rx or --tx, and --tags.

        --default-cfi <cfi> Sets the default CFI value of a tagging rule table to <cfi>. When a table is created, its default CFI 
        value is set to 0. Dependencies: --if, --rx or --tx, and --tags.

        --default-vid <vid> Sets the default VID value of a tagging rule table to <vid>. When a table is created, its default VID 
        value is set to 1 (as per IEEE 802.1Q). Dependencies: --if, --rx or --tx, and --tags.

        --cfg-dscp2pbits <dscp> <pbits> Programs the entry number <dscp> of the DSCP-TO-PBITS translation table of a Real Device to
        the value specified by <pbits>. When a tagging rule table is created, the default values of the DSCP-TO-PBITS table are 
        set by copying the lowest 3 bits of each DSCP value as the PBITS value, for each entry in the table. For instance, the 
        following entries are programmed by default: DSCP=5:PBITS=5, DSCP=15:PBITS=7, etc. The DSCP-TO-PBITS translation table 
        has 64 entries. Dependencies: --if.

        --show-dscp2pbits Lists the values programmed in the DSCP-TO-PBITS table of the specified Real Device. Dependencies: 
        --if.

        --cfg-tpid <tpid0> <tpid1> <tpid2> <tpid3> Configures the TPID Table entries of a given Real Interface. The configured 
        TPID values are used to identify VLAN Headers of packets received from and transmitted to the VOPIs created for a given
        Real Interface. Four values must always be specified. The default TPID values are 0x8100, 0x8100, 0x8100, and 0x8100. 
        Dependencies: --if.

        --show-tpid Lists the values programmed in the TPID Table of the specified Real Device. Dependencies: --if.

        --local-stats <vlan_if_name> Shows the statistics counters maintained for the VOPI named <vlan_if_name>. These counters 
        are complimentary to the standard counters maintained for the device, which can be read via the Linux ifconfig 
        command.

        --filter-ethertype <ethertype> Match the Ethertype field in the Ethernet Header of incoming frames against <ethertype>.

        --filter-pbits <pbits> <tag_nbr> Match the PBITS value of VLAN Header number <tag_nbr> of incoming frames against 
        <pbits>.

        --filter-cfi <cfi> <tag_nbr> Match the CFI bit of VLAN Header number <tag_nbr> of incoming frames against <cfi>.

        --filter-vid <vid> <tag_nbr> Match the VID value of VLAN Header number <tag_nbr> of incoming frames against <vid>.

        --filter-tag-ethertype <ethertype> <tag_nbr> Match the Ethertype field of the VLAN Header number <tag_nbr> of incoming 
        frames against <ethertype>.

        --filter-dscp <dscp> Match the DSCP value in the IPv4 header of incoming frames against <dscp>.
        --filter-rxif <real_if_name> Match the rx VOPI of the transmitting packet against <real-if-name>. This filter can be used to bind a Tagging 
        Rule to a specific rx VOPI on the TRANSMIT direction. This filter is not applicable for rules in the RECEIVE direction.

        --filter-txif <vlan_if_name> Match the transmitting VOPI against <vlan-if-name>. This filter can be used to bind a Tagging 
        Rule to a specific VOPI on the TRANSMIT direction. This filter is not applicable for rules in the RECEIVE direction. 
        TRANSMIT rules without this filter will apply to all frames transmitted from all VOPIs attached to the Real Device.

        --filter-skb-prio <priority> Match the SKB priority of incoming frames against <priority>.

        --filter-skb-mark-flowid <flowid> Match the Flow ID subfield of the SKB Mark field against <flowid>. The SKB Mark Flow ID 
        subfield can be used as a way to correlate packet classification made by other Linux modules (such as ebtables and 
        iptables) with Tagging Rules. A possible usage for this filter would be to direct packets generated by an application to 
        a specific port of a real interface (such as a GPON port) based on layer 3 filters. In this example a socket would be 
        created on a VOPI,IP Tables rules would be created to identify flows and set Flow IDs, and Tagging rules would be 
        created to match on such Flow IDs and apply treatments, such as setting the destination GEM Port and Queue.

        --filter-skb-mark-port <port> Match the Port subfield of the SKB Mark field against <port>. This filter can be used to bind
         certain Tagging Rules with a specific Real Interface port (for instance a GPON Port).

        --filter-vlan-dev-mac-addr <ignore_if_multicast> Match the recv frame dest MAC addr against the recv virtual interface.
         Set <ignore_if_multicast> to 0 to apply filter on all recv frames.
         Set <ignore_if_multicast> to 1 to apply filter on unicast frames only.
         This filter is not applicable for rules in the TRANSMIT direction.

        --pop-tag Remove the outermost VLAN tag. If multiple tags are to be removed, this treatment should be specified for each 
        VLAN tag to be removed.

        --push-tag Add the default VLAN tag of the corresponding Tagging Rule Table as the new outer tag. The default TPID value
        will be used as the new Ethertype value in the Ethernet header, the existing Ethertype of the Ethernet Header will be used
        as the Tag Ethertype field of the new tag, and the default PBITS, CFI and VID will be used as the TCI of the new tag. If
        multiple tags are to be inserted, this treatment must be specified for each VLAN tag to be inserted.

        --set-ethertype <ethertype> Set the Ethertype value of the Ethernet Header to <ethertype>.

        --set-pbits <pbits> <tag_nbr> Set the PBITS value of the VLAN Header number <tag_nbr> to <pbits>.

        --set-cfi <cfi> <tag_nbr> Set the CFI bit of the VLAN Heade number <tag_nbr> to <cfi>.

        --set-vid <vid> <tag_nbr> Set the VID of the VLAN Header number <tag_nbr> to <vid>.

        --set-tag-ethertype <ethertype> Set the Ethertype field of the VLAN Header number <tag_nbr> to <ethertype>.

        --set-dscp <dscp> Set the IPv4 DSCP value of the matching frame to <dscp>.

        --copy-pbits <from_tag_nbr> <to_tag_nbr> Copy the PBITS value from VLAN Header number <from_tag_nbr> to VLAN Header number 
        <to_tag_nbr>.

        --copy-cfi <from_tag_nbr> <to_tag_nbr> Copy the CFI value from VLAN Header number <from_tag_nbr> to VLAN Header number 
        <to_tag_nbr>.

        --copy-vid <from_tag_nbr> <to_tag_nbr> Copy the VID value from VLAN Header number <from_tag_nbr> to VLAN Header number 
        <to_tag_nbr>.

        --copy-tag-ethertype <from_tag_nbr> <to_tag_nbr> Copy the Ethertype value from VLAN Header number <from_tag_nbr> to VLAN 
        Header number <to_tag_nbr>.

        --dscp2pbits <tag_nbr> Translate the IPv4 DSCP into a PIBTS value, and write the translated PBITS value in the VLAN Header 
        number <tag_nbr>. The DSCP-To-PBITS table of the respective Real Device is used for translation.

        --set-rxif <vlan_if_name> Forward frames in the RECEIVE direction that match this rule to the VOPI specified in 
        <vlan_if_name>. If not specified, the frame will be forwarded to a randomly chosen VOPI. Using this treatment in the 
        TRANSMIT direction has no effect.

        --set-if-mode-ont Set real device mode to ONT.

        --set-if-mode-rg  Set real device mode to RG.

        --drop-frame Drop the matching frame.
        --set-skb-prio <priority> Set the SKB priority to <priority>.

        --set-skb-mark-port <port> Set the Port subfield of the SKB Mark field to <port>. The SKB Mark Port subfield is used by 
        the Broadcom device drivers to send a frame to a specific port within a Real Interface. For instance, a GPON Real 
        Interface may have been configured with multiple GEM Ports. When a packet is sent to that interface, the driver uses 
        the SKB Mark Port subfield as the GEM Port to which the packets will be transmitted.

        --set-skb-mark-queue <queue> Set the Queue subfield of the SKB Mark field to <queue>. The SKB Mark Queue subfield is used 
        by the Broadcom device drivers to determine the queue to which transmit a frame.

        --set-skb-mark-flowid <flowid> Set the Flow ID subfield of the SKB Mark field to <flowID>. The SKB Mark Flow ID subfield 
        can be used as a way to correlate packet classification made by Tagging Rules with other Linux modules (such as 
        ebtables and iptables).

        --rule-type <type> set the type of rule. 0: flow; 1: qos; 

        --create-flows <rx_vlan_ifname> <tx_vlan_ifname> Setup vlan flows for the path (rx_vlan_ifname->tx_vlan_ifname).

        --delete-flows <rx_vlan_ifname> <tx_vlan_ifname> Remove vlan flows for the path (rx_vlan_ifname->tx_vlan_ifname).

I want to tag Interface wl0.1 (I think that's guest wifi)

root@D7000:~$ ifconfig
bcmsw     Link encap:Ethernet  HWaddr 40:5D:82:D8:24:C8  
          UP BROADCAST RUNNING MULTICAST  MTU:2048  Metric:1
          RX packets:57388923 errors:0 dropped:0 overruns:0 frame:0
          TX packets:187090643 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1317442107 (1.2 GiB)  TX bytes:2576848083 (2.3 GiB)
          Base address:0xffff 

eth0      Link encap:Ethernet  HWaddr 40:5D:82:D8:24:CC  
          inet6 addr: fe80::425d:82ff:fed8:24cc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:2048  Metric:1
          RX packets:243534438 errors:1 dropped:0 overruns:0 frame:0
          TX packets:173423702 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1548347112 (1.4 GiB)  TX bytes:3737972809 (3.4 GiB)

eth0.1    Link encap:Ethernet  HWaddr 40:5D:82:D8:24:CC  
          inet6 addr: fe80::425d:82ff:fed8:24cc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:2048  Metric:1
          RX packets:198344581 errors:0 dropped:39855 overruns:0 frame:0
          TX packets:140572281 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:3141536371 (2.9 GiB)  TX bytes:1655291526 (1.5 GiB)

eth1      Link encap:Ethernet  HWaddr 40:5D:82:D8:24:C8  
          inet6 addr: fe80::425d:82ff:fed8:24c8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:2048  Metric:1
          RX packets:359719451 errors:0 dropped:0 overruns:0 frame:0
          TX packets:279528765 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:418828707 (399.4 MiB)  TX bytes:1551234438 (1.4 GiB)
          

eth2      Link encap:Ethernet  HWaddr 40:5D:82:D8:24:C8  
          inet6 addr: fe80::425d:82ff:fed8:24c8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:2048  Metric:1
          RX packets:165085110 errors:0 dropped:0 overruns:0 frame:0
          TX packets:146230722 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:3915063361 (3.6 GiB)  TX bytes:316831828 (302.1 MiB)
          

eth3      Link encap:Ethernet  HWaddr 40:5D:82:D8:24:C8  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          

eth4      Link encap:Ethernet  HWaddr 40:5D:82:D8:24:C8  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          

group1    Link encap:Ethernet  HWaddr 40:5D:82:D8:24:C8  
          inet addr:192.168.1.20  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::425d:82ff:fed8:24c8/64 Scope:Link
          UP BROADCAST RUNNING ALLMULTI  MTU:1500  Metric:1
          RX packets:7994388 errors:0 dropped:5681 overruns:0 frame:0
          TX packets:1024457 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1822534444 (1.6 GiB)  TX bytes:302877582 (288.8 MiB)

group2    Link encap:Ethernet  HWaddr 5A:0C:20:E4:70:D8  
          inet6 addr: fe80::580c:20ff:fee4:70d8/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:31 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:2818 (2.7 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:2030817 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2030817 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:486961177 (464.4 MiB)  TX bytes:486961177 (464.4 MiB)

wl0       Link encap:Ethernet  HWaddr 40:5D:82:D8:24:C8  
          inet6 addr: fe80::425d:82ff:X:X/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:29833381 errors:0 dropped:15 overruns:0 frame:33465316
          TX packets:29911759 errors:4514 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:4168385661 (3.8 GiB)  TX bytes:353953371 (337.5 MiB)
          Interrupt:92 

wl0.1     Link encap:Ethernet  HWaddr 62:5D:82:D8:24:C9  
          inet6 addr: fe80::605d:82ff:X:X/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:33465316
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

wl1       Link encap:Ethernet  HWaddr 40:5D:82:D8:24:CA  
          inet6 addr: fe80::425d:82ff:X:X/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:127636241 errors:0 dropped:1 overruns:0 frame:31205843
          TX packets:324202192 errors:51244 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:671185127 (640.0 MiB)  TX bytes:1335835440 (1.2 GiB)
          Interrupt:93

I'm not sure if this is possible at all, with the native vlanctl package or with an external package, but thought you would know more about this than me.

Project page does not explain what it does

I have a Netgear D7000. I am interested in replacing the ghastly stock firmware with something better. I have found this project and this site too:

https://negan07.github.io/ancistrus/

Once I've run these scripts, what will my D7000 do? Will it be running OpenWRT? Something similar? There is no explanation of what this project actually is/does.

Extend Openvpn to client usages

Hello,
I was wondering if it was possible to create a vpn tunnel to a vpn provider (like NordVpn) using OpenVPN.
I already configured the classic VPN client to the netgear and it works fine.
But instead it is possible to connect the router as a client to one of the NordVPN servers (having the ovpn file obviously importable) in order to crypt all the outgoing traffic?

Sorry if I opened this request as an "issue" but I didn't know how else to contact you

Thanks in advance.

dnrd 'fails' regularly

Not your problem, but a core issue with D7000 - the dns autoforwarder craps out after a large number of look ups - currently about a week here in my house.

So I want to setup a restart process say every night - do I just do a personal cronjob "rc_dnrd autostart" ? Is there anything that gets kicked off by default on the hour (say 3am)? Do you know if there are any other flags to the rc_dnrd comand I need?

New firmware upgrade .44 to .48

Differences between .44 .48 firmware:

diff -urN /home/ubuntu/Desktop/D7000_V1.0.1.44_WW_src/Source/apps/mini_httpd-1.17beta1/mini_httpd.c /home/ubuntu/Desktop/D7000_V1.0.1.48_WW_src/Source/apps/mini_httpd-1.17beta1/mini_httpd.c
--- /home/ubuntu/Desktop/D7000_V1.0.1.44_WW_src/Source/apps/mini_httpd-1.17beta1/mini_httpd.c 2016-10-11 17:56:20.000000000 +0200
+++ /home/ubuntu/Desktop/D7000_V1.0.1.48_WW_src/Source/apps/mini_httpd-1.17beta1/mini_httpd.c 2017-03-27 17:13:40.000000000 +0200
@@ -1455,10 +1455,12 @@
}
}
/* For these .gif or .css of .js or .xml or .jpg file, it will be used by other .htm file, and it's no need to request auth for these files. */
-if( (strstr(path,".gif")!=NULL) || (strstr(path,".css") !=NULL) || (strstr(path,".js") != NULL)
+if( ((strstr(path,".gif")!=NULL) || (strstr(path,".css") !=NULL) || (strstr(path,".js") != NULL)
|| (strstr(path,".xml") != NULL)
-|| (strstr(path,".jpg") != NULL)
-)
+|| (strstr(path,".jpg") != NULL))
+//avoid a url like "xxx.htm/xxxx.js, this can skip auth"
+&& ((strstr(path, ".htm") == NULL) && (strstr(path, ".html") == NULL) && (strstr(path, ".asp") == NULL))
+)
return 1;
return 0;

Web interface Access Problem after ReadySHARE USB activating

After activating the ReadyUSB SHARE feature of the router (which I had not tested yet)
There was an unusual problem: I can no longer access the router's web interface.
Before encountering the problem in the "ReadyUSB SHARE" section I had activated the access via network share (\ folder) and access via HTTP ... I believe that the latter has generated some conflict of ports with the webUI that now returns this error:

problemaui

Now I'm quite confused because I do not know if there is a way to disable the ReadySHARE USB (http access) function via CLI from telnet or there is a need to make a factory reset from the button ...
In the hypothesis of the factory reset from the button on the router there is no risk of bricking the router not being the stock firmware?

UPS monitoring/alerting through NUT

Integrated UPS monitoring/alerting through NUT

D7000 uses CPU: Broadcom BCM[9?]63138 @1GHZ (DualCore ARM Cortex A9)
CPUInfo Features : swp half thumb fastmult edsp tls

Further reading:
https://wiki.openwrt.org/doc/hardware/soc/soc.broadcom.bcm63xx
https://github.com/networkupstools/nut/

I am no expert and don't have much time, but have some systems/programming background so will try to follow your lead to share what I can.

http://networkupstools.org/

Software can be prepared but hardware needed for testing.

snmp

any chance we could get an snmp daemon on this firmware?

OpenVPN: TLS Key negotiation failed / connectivity

I've checked prior OpenVPN ticket #5 and sources on Netgear and OpenVPN and can't identify the correct solution for this, so I hope you might be able to help!

Error in client logs (smart phone):
TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
I can also see no connection attempt on the server-side OpenVPN logs.

I'm using latest D7000 Ancistrus monolithic image V1.0.1.70_1.0.1, where you have enabled versions: OpenVPN 2.4.7; OpenSSL 1.0.2r; 26 Feb 2019
Through D7000 WebGUI (Ancistrus > Management > OPENVPN), I've configured OpenVPN TAP/TUN server (server.conf & server_phone.conf), mostly defaults with two server options: force UDP4 (ignore IP6 to try to keep config simple to pre 2.4 levels), and to show all parameters to help me debug through logs:

  • proto udp4
  • mute 256

Also enabled your OpenSSH package, and through PuTTY terminal, have checked ps and netstat -a confirms both /usr/sbin/openvpn processes are running with corresponding TAP/TUN bridge config files, and that there are mappings for default configured TAP/TUN ports.

The only info now in server logs is: NOTE: when bridging your LAN adapter with the TAP adapter, note that the new bridge adapter will often take on its own IP address that is different from what the LAN adapter was previously set to
UDPv4 link local (bound): [AF_INET] x.x.1.254:12973
/bin/ip addr add dev tun0 x.x.2.1/24 broadcast x.x.2.255

I have exported and built monolithic *.ovpn client files (with embedded ca, cert and key) and successfully imported these into two clients for:

  • Windows: OpenVPN GUI (OpenVPN 2.4.7 x86_64-w64-mingw32; OpenSSL 1.1.0j; 20 Nov 2018); and
  • Android: OpenVPN for Android (OpenVPN 2.5-icsopenvpn/v0.7.8.0g; OpenSSL 1.1.1b; Feb 22 2019)

Both clients timeout, can't get past TLS negotiation, with or without LZ compression.

The remote IP is correct and statically assigned. Client/Server versions all seem close enough to work.
Not sure if I have to configure something to use the tun0 x.x.2.0 subnet, but at this stage think not?
I've not played with remote management, port forwarding or iptables at this point since other posts have been conflicting as to whether changes to forwarding/firewalls might be required when the VPN server is running on the gateway device itself.

Happy to share some more detail logs if it would help.
Can you offer me any tips!?

Updating packages from monolithic #272

Hi and first of all thanks for you support on this great modem router.
I switched from last netgear firmware to your #272 monolithic upgrade.
When i performed 'opkg upgrade', after 'opkg upgrade', i got this output:
admin@D7000:$ opkg update
Downloading https://raw.githubusercontent.com/negan07/ancistrus/gh-pages/ancistrus-arm-D7000/Packages.gz.
Updated source 'ancistrus-arm-D7000'.
admin@D7000:$ opkg upgrade
Upgrading opkg from 0.3.4 to 0.3.6-010 on root.
Upgrading opkg (0.3.6) on root.
Downloading https://raw.githubusercontent.com/negan07/ancistrus/gh-pages/ancistrus-arm-D7000/opkg_0.3.6-010_armD7000.ipk.
To remove package debris, try opkg remove opkg.
To re-attempt the install, try opkg install opkg.
Upgrading openssh from 7.6p1 to 7.6p1-010 on root.
Upgrading openssh (7.6p1) on root.
Downloading https://raw.githubusercontent.com/negan07/ancistrus/gh-pages/ancistrus-arm-D7000/openssh_7.6p1-010_armD7000.ipk.
Upgrading openvpn from 2.4.4 to 2.4.5 on root.
Upgrading openvpn (2.4.5) on root.
Downloading https://raw.githubusercontent.com/negan07/ancistrus/gh-pages/ancistrus-arm-D7000/openvpn_2.4.5_armD7000.ipk.
Upgrading iproute2 from 4.10.0 to 4.16.0 on root.
Upgrading iproute2 (4.16.0) on root.
Downloading https://raw.githubusercontent.com/negan07/ancistrus/gh-pages/ancistrus-arm-D7000/iproute2_4.16.0_armD7000.ipk.
Upgrading qos-sqm from 1.2.0-13.025 to 1.2.0-13.027 on root.
Upgrading qos-sqm (1.2.0) on root.
Downloading https://raw.githubusercontent.com/negan07/ancistrus/gh-pages/ancistrus-arm-D7000/qos-sqm_1.2.0-13.027_armD7000.ipk.
Upgrading ancistrus-core from 0.9.4 to 1.0.4 on root.
Upgrading ancistrus-core (1.0.4) on root.
Downloading https://raw.githubusercontent.com/negan07/ancistrus/gh-pages/ancistrus-arm-D7000/ancistrus-core_1.0.4_armD7000.ipk.
Configuring zlib.
Configuring ancistrus-core.
Copying conf files & init.d runlevel dirtree on ram...
Linking rc services to core on ram...
Testing rc_apps functionality... looking good
Linking rc services to core on flash...
Configuring openssh.
Configuring utelnetd.
Configuring openvpn.
Configuring iproute2.
Configuring hdparm.
Configuring smartmontools.
Configuring qos-sqm.
Type '/usr/sbin/rc_app/rc_qos help' to see the options & settings
Configuring network-test.
Collected errors:

  • open_outer: Failed to open package '/tmp/opkg/cache/dbf5e1a8ab4d5f12322daeb79931525d_opkg_0.3.6-010_armD7000.ipk': Failed to open '/tmp/opkg/cache/dbf5e1a8ab4d5f12322daeb79931525d_opkg_0.3.6-010_armD7000.ipk'
  • open_outer: Failed to open package '/tmp/opkg/cache/dbf5e1a8ab4d5f12322daeb79931525d_opkg_0.3.6-010_armD7000.ipk': Failed to open '/tmp/opkg/cache/dbf5e1a8ab4d5f12322daeb79931525d_opkg_0.3.6-010_armD7000.ipk'
  • pkg_extract_data_file_names_to_stream: Failed to extract data.tar.* from package '/tmp/opkg/cache/dbf5e1a8ab4d5f12322daeb79931525d_opkg_0.3.6-010_armD7000.ipk'.
  • pkg_get_installed_files: Error extracting file list from /tmp/opkg/cache/dbf5e1a8ab4d5f12322daeb79931525d_opkg_0.3.6-010_armD7000.ipk.
  • opkg_install_pkg: Failed to determine obsolete files from previously installed opkg
  • open_outer: Failed to open package '/tmp/opkg/cache/dbf5e1a8ab4d5f12322daeb79931525d_opkg_0.3.6-010_armD7000.ipk': Failed to open '/tmp/opkg/cache/dbf5e1a8ab4d5f12322daeb79931525d_opkg_0.3.6-010_armD7000.ipk'
  • open_outer: Failed to open package '/tmp/opkg/cache/dbf5e1a8ab4d5f12322daeb79931525d_opkg_0.3.6-010_armD7000.ipk': Failed to open '/tmp/opkg/cache/dbf5e1a8ab4d5f12322daeb79931525d_opkg_0.3.6-010_armD7000.ipk'
  • pkg_extract_control_files_to_dir_with_prefix: Failed to extract control.tar.* from package '/tmp/opkg/cache/dbf5e1a8ab4d5f12322daeb79931525d_opkg_0.3.6-010_armD7000.ipk'.
  • opkg_install_pkg: Failed to extract maintainer scripts for opkg. Package debris may remain!
  • create_file_stamp: Failed to open file /tmp/opkg/cache/900a80fd0eea684ff97290d1ac136e0a_openssh_7.6p1-010_armD7000.ipk.@stamp
  • opkg_validate_cached_file: Failed to create stamp for /tmp/opkg/cache/900a80fd0eea684ff97290d1ac136e0a_openssh_7.6p1-010_armD7000.ipk.
  • opkg_validate_cached_file: Failed to open cache file /tmp/opkg/cache/900a80fd0eea684ff97290d1ac136e0a_openssh_7.6p1-010_armD7000.ipk
  • opkg_install_pkg: Failed to download openssh. Perhaps you need to run 'opkg update'?
  • create_file_stamp: Failed to open file /tmp/opkg/cache/a9bd68b94150c62fc3f4fe771cc2efa8_openvpn_2.4.5_armD7000.ipk.@stamp
  • opkg_validate_cached_file: Failed to create stamp for /tmp/opkg/cache/a9bd68b94150c62fc3f4fe771cc2efa8_openvpn_2.4.5_armD7000.ipk.
  • opkg_validate_cached_file: Failed to open cache file /tmp/opkg/cache/a9bd68b94150c62fc3f4fe771cc2efa8_openvpn_2.4.5_armD7000.ipk
  • opkg_install_pkg: Failed to download openvpn. Perhaps you need to run 'opkg update'?
  • create_file_stamp: Failed to open file /tmp/opkg/cache/e96401ea15bef00db6d4012380f50d86_iproute2_4.16.0_armD7000.ipk.@stamp
  • opkg_validate_cached_file: Failed to create stamp for /tmp/opkg/cache/e96401ea15bef00db6d4012380f50d86_iproute2_4.16.0_armD7000.ipk.
  • opkg_validate_cached_file: Failed to open cache file /tmp/opkg/cache/e96401ea15bef00db6d4012380f50d86_iproute2_4.16.0_armD7000.ipk
  • opkg_install_pkg: Failed to download iproute2. Perhaps you need to run 'opkg update'?
  • create_file_stamp: Failed to open file /tmp/opkg/cache/85348b087dea1f12ccd9f8deff57d3a6_qos-sqm_1.2.0-13.027_armD7000.ipk.@stamp
  • opkg_validate_cached_file: Failed to create stamp for /tmp/opkg/cache/85348b087dea1f12ccd9f8deff57d3a6_qos-sqm_1.2.0-13.027_armD7000.ipk.
  • opkg_validate_cached_file: Failed to open cache file /tmp/opkg/cache/85348b087dea1f12ccd9f8deff57d3a6_qos-sqm_1.2.0-13.027_armD7000.ipk
  • opkg_install_pkg: Failed to download qos-sqm. Perhaps you need to run 'opkg update'?
  • create_file_stamp: Failed to open file /tmp/opkg/cache/582f32050390fafd71de1e69e3b23050_ancistrus-core_1.0.4_armD7000.ipk.@stamp
  • opkg_validate_cached_file: Failed to create stamp for /tmp/opkg/cache/582f32050390fafd71de1e69e3b23050_ancistrus-core_1.0.4_armD7000.ipk.
  • opkg_validate_cached_file: Failed to open cache file /tmp/opkg/cache/582f32050390fafd71de1e69e3b23050_ancistrus-core_1.0.4_armD7000.ipk
  • opkg_install_pkg: Failed to download ancistrus-core. Perhaps you need to run 'opkg update'?

After this i re-performed 'opkg upgrade', after 'opkg upgrade', and i got this output:
admin@D7000:$ opkg update
Downloading https://raw.githubusercontent.com/negan07/ancistrus/gh-pages/ancistrus-arm-D7000/Packages.gz.
Updated source 'ancistrus-arm-D7000'.
admin@D7000:$ opkg upgrade
Upgrading openssh from 7.6p1 to 7.6p1-010 on root.
Upgrading openssh (7.6p1) on root.
Downloading https://raw.githubusercontent.com/negan07/ancistrus/gh-pages/ancistrus-arm-D7000/openssh_7.6p1-010_armD7000.ipk.
When finished, kill manually sshd typing: 'killall -9 sshd'
Upgrading openvpn from 2.4.4 to 2.4.5 on root.
Upgrading openvpn (2.4.5) on root.
Downloading https://raw.githubusercontent.com/negan07/ancistrus/gh-pages/ancistrus-arm-D7000/openvpn_2.4.5_armD7000.ipk.
Openvpn builtin required: cannot uninstall...
To remove package debris, try opkg remove openvpn.
To re-attempt the install, try opkg install openvpn.
Upgrading iproute2 from 4.10.0 to 4.16.0 on root.
Upgrading iproute2 (4.16.0) on root.
Downloading https://raw.githubusercontent.com/negan07/ancistrus/gh-pages/ancistrus-arm-D7000/iproute2_4.16.0_armD7000.ipk.
iproute2 builtin required: cannot uninstall...
To remove package debris, try opkg remove iproute2.
To re-attempt the install, try opkg install iproute2.
Upgrading qos-sqm from 1.2.0-13.025 to 1.2.0-13.027 on root.
Upgrading iproute2 (4.16.0) on root.
Upgrading qos-sqm (1.2.0) on root.
Downloading https://raw.githubusercontent.com/negan07/ancistrus/gh-pages/ancistrus-arm-D7000/qos-sqm_1.2.0-13.027_armD7000.ipk.
Upgrading ancistrus-core from 0.9.4 to 1.0.4 on root.
Upgrading ancistrus-core (1.0.4) on root.
Downloading https://raw.githubusercontent.com/negan07/ancistrus/gh-pages/ancistrus-arm-D7000/ancistrus-core_1.0.4_armD7000.ipk.
Reverting to original xdslctl ...
Reverting to original rc_apps ...
Ram cleanup ...
Configuring ancistrus-core.
Updating boot script ...
Updating libscnvram.so ...
Testing nvram basic functionality... looking good
Copying init.d runlevel dirtree & conf files on ram...
Linking rc services to core on ram...
Testing rc_apps functionality... looking good
Linking rc services to core on flash...
Linking xdslctl to core on flash...
Updating main web pages & styles...
Configuring openssh.
Configuring qos-sqm.
Type '/usr/sbin/rc_app/rc_qos help' to see the options & settings
Collected errors:

  • pkg_run_script: package "openvpn" prerm script returned status 1.
  • prerm_upgrade_old_pkg: prerm script for package "openvpn" failed
  • pkg_run_script: package "iproute2" prerm script returned status 1.
  • prerm_upgrade_old_pkg: prerm script for package "iproute2" failed

Do I did something wrong?
Regards
Dario

Update DSL Driver

Hi, thanks for the new update.
I have updated to the new version # 370, but I can not install the updated dsl driver.
Package Manager> Update / Install Package> Select "xdsl-driver-agtef" and after "Apply" but nothing happens, stay on the same screen but without the package names.

Thanks

Edit: solved by installing Firefox, with Edge not working.

Dsl-Tweaking setting driver defaults

In according with https://github.com/negan07/ancistrus/wiki/Dsl-Tweaking:

admin@D7000:$ anc nvram get bitswap sra trellis sesdrop cominmgn sos dynamicd dy
namicf i24k monitortone phyrexmt ginp
bitswap=on
sra=off
trellis=on
sesdrop=on <<<<<<<<<<<
cominmgn=off
sos=on
dynamicd=off <<<<<<<<<<<
dynamicf=off
i24k=on
monitortone=on
phyrexmt=3 <<<<<<<<<<<
ginp=0 <<<<<<<<<<<

But:
admin@D7000:$ xdslctl profile --show

    bitswap         On
    sra             Off
    trellis         On
    sesdrop         Off        <<<<<<<<<<<
    CoMinMgn        Off
    24k             On
    phyReXmt(Us/Ds) Off/On      <<<<<<<<<<
    Ginp(Us/Ds)     On/On       <<<<<<<<<<<<
    TpsTc           AvPvAa
    monitorTone:    On
    dynamicD:       On             <<<<<<<<<<<<
    dynamicF:       Off
    SOS:            On
    Training Margin(Q4 in dB):      -1(DEFAULT)

Reboot schedule

Hi,
what commands should i insert in crontab to reboot router at specific time?
I tried with 2 different commands but none works on this router while on another openwrt router does.
First one is:
30 4 * * * root shutdown -r now
Second one is:
30 4 * * * sleep 70 && touch /etc/banner && reboot
Thanks for support.
P.S: using latest firmware my bufferbloat is 1ms both as vdsl modem and router only (other bridge modem)!!! Great work!!! Thanks.

OPENVPN on smartphone

It has been noticed a bug affecting vpn connection with smartphone:
explain in details what happen.

Qos-sqm when using the D7000 as a router connected to a separate ADSL modem

Does Qos-sqm work correctly where the D7000 is connected to a seperate DSL modem running in bridge mode?

The settings GUI has correctly detected it is a pure ethernet connection rather than ADSL.

With an uplink of 1023 kbps and download of about 8000 kbps reported by the modem itself - what else do I set?

Compile Issue

Hi,

Sorry if I appear stupid. Using Debian 9 with latest patches.
I have managed to compile the toolchain without issues.
When it comes to sources I hit the following issue
`root@d7000-dev:/home/mockbuild/ancistrus# make sources -j 1 V=s
-e KERNEL: make vmlinux.lz
PROJECT=D7000
make -C Source -s
-e IMG: clean
-e TARGET: clean
-e SOURCE: PRE_FS garbage orphans cleanup
-e SOURCE: make UCLIBC
-e SOURCE: make APPS
-e APPS: make nvram
-e APPS: make sc_libs
-e APPS: make cnapt
-e APPS: make libiconv.1.8

-e libiconv-1.8/lib

All LIBS are OK!
-e APPS: make flex-2.5.4
-e APPS: make openssl-1.0.0r
making all in crypto...
making all in crypto/objects...
making all in crypto/md4...
making all in crypto/md5...
making all in crypto/sha...
making all in crypto/mdc2...
making all in crypto/hmac...
making all in crypto/ripemd...
making all in crypto/whrlpool...
making all in crypto/des...
making all in crypto/aes...
making all in crypto/rc2...
making all in crypto/rc4...
making all in crypto/idea...
making all in crypto/bf...
making all in crypto/cast...
making all in crypto/camellia...
making all in crypto/seed...
making all in crypto/modes...
making all in crypto/bn...
making all in crypto/ec...
making all in crypto/rsa...
making all in crypto/dsa...
making all in crypto/ecdsa...
making all in crypto/dh...
making all in crypto/ecdh...
making all in crypto/dso...
making all in crypto/engine...
making all in crypto/buffer...
making all in crypto/bio...
making all in crypto/stack...
making all in crypto/lhash...
making all in crypto/rand...
making all in crypto/err...
making all in crypto/evp...
making all in crypto/asn1...
making all in crypto/pem...
making all in crypto/x509...
making all in crypto/x509v3...
making all in crypto/conf...
making all in crypto/txt_db...
making all in crypto/pkcs7...
making all in crypto/pkcs12...
making all in crypto/comp...
making all in crypto/ocsp...
making all in crypto/ui...
making all in crypto/krb5...
making all in crypto/cms...
making all in crypto/pqueue...
making all in crypto/ts...
making all in ssl...
making all in engines...

making all in engines/ccgost...
making all in apps...
making all in test...
making all in tools...
-e APPS: make libixml
-e APPS: make samba-3.0.22
Removing prototype headers
Linking bin/smbclient
Using FLAGS = -marm -march=armv7-a -mcpu=cortex-a9 -mtune=cortex-a9 -pipe -funit-at-a-time -fomit-frame-pointer -ffixed-r8 -fno-common -mno-thumb-interwork -mabi=aapcs-linux -mfloat-abi=soft -Os -rdynamic -fPIC -DSC_BUILD -I./popt -Iinclude -I/home/mockbuild/ancistrus/D7000_V1.0.1.64_WW_src/Source/apps/samba-3.0.22/source/include -I/home/mockbuild/ancistrus/D7000_V1.0.1.64_WW_src/Source/apps/samba-3.0.22/source/ubiqx -I/home/mockbuild/ancistrus/D7000_V1.0.1.64_WW_src/Source/apps/samba-3.0.22/source/smbwrapper -I. -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -I/home/mockbuild/ancistrus/D7000_V1.0.1.64_WW_src/Source/apps/samba-3.0.22/source -I../../acl/include
LIBS = -lnsl -lcrypt -lresolv -ldl -liconv
LDSHFLAGS = -shared -Wl,-Bsymbolic
LDFLAGS = -L/home/mockbuild/ancistrus/D7000_V1.0.1.64_WW_src/Source//apps/libiconv.1.8/lib -lnsl -lcrypt -lresolv -ldl -liconv
PIE_CFLAGS =
PIE_LDFLAGS =
-e APPS: make e2fsprogs
has configuration
making all in lib/et
making all in lib/ss
making all in lib/e2p
making all in lib/uuid
making all in lib/ext2fs
making all in lib/blkid
making all in intl
making all in lib/et
making all in lib/ss
making all in lib/e2p
making all in lib/uuid
making all in lib/ext2fs
making all in lib/blkid
making all in intl
making all in e2fsck
making all in debugfs
making all in misc
making all in tests/progs
making all in po
-e APPS: make bftpd-2.3
-e APPS: make mtool
-e APPS: make hd-idle
-e APPS: make hdparm-9.43
-e APPS: make lsof_4.82_src
Constructing version.h
print.o: In function `gethostnm':
print.c:(.text+0x944): warning: gethostbyaddr is obsolescent, use getaddrinfo() instead.
-e APPS: make mediaserver

-e library/ffmpeg

has configuration

-e library/zlib-1.2.3


-e library/sqlite-3.5.9


-e library/jpeg-6b


-e library/libogg-1.3.0/src

../libtool: 1564: ../libtool: preserve_args+= --tag CC: not found
../libtool: 1: eval: base_compile+= /opt/toolchains/crosstools-arm-gcc-4.6-linux-3.4-uclibc-0.9.32-binutils-2.21-NPTL/usr/bin/arm-linux-gcc: not found
../libtool: 1: eval: base_compile+= -DHAVE_CONFIG_H: not found
../libtool: 1: eval: base_compile+= -I.: not found
../libtool: 1: eval: base_compile+= -I..: not found
../libtool: 1: eval: base_compile+= -I../include: not found
../libtool: 1: eval: base_compile+= -I../include: not found
../libtool: 1: eval: base_compile+= -marm: not found
../libtool: 1: eval: base_compile+= -march=armv7-a: not found
../libtool: 1: eval: base_compile+= -mcpu=cortex-a9: not found
../libtool: 1: eval: base_compile+= -mtune=cortex-a9: not found
../libtool: 1: eval: base_compile+= -pipe: not found
../libtool: 1: eval: base_compile+= -funit-at-a-time: not found
../libtool: 1: eval: base_compile+= -fomit-frame-pointer: not found
../libtool: 1: eval: base_compile+= -ffixed-r8: not found
../libtool: 1: eval: base_compile+= -fno-common: not found
../libtool: 1: eval: base_compile+= -mno-thumb-interwork: not found
../libtool: 1: eval: base_compile+= -mabi=aapcs-linux: not found
../libtool: 1: eval: base_compile+= -mfloat-abi=soft: not found
../libtool: 1: eval: base_compile+= -Os: not found
../libtool: 1: eval: base_compile+= -Wall: not found
../libtool: 1: eval: base_compile+= -s: not found
../libtool: 1: eval: base_compile+= -MMD: not found
../libtool: 1: eval: base_compile+= -DSC_MUTIL_GROUP: not found
../libtool: 1: eval: base_compile+= -MT: not found
../libtool: 1: eval: base_compile+= framing.lo: not found
../libtool: 1: eval: base_compile+= -MD: not found
../libtool: 1: eval: base_compile+= -MP: not found
../libtool: 1: eval: base_compile+= -MF: not found
../libtool: 1: eval: base_compile+= .deps/framing.Tpo: not found
../libtool: 1: eval: base_compile+= -c: not found
libtool: compile: you must specify a compilation command
libtool: compile: Try libtool --help --mode=compile' for more information. Makefile:347: recipe for target 'framing.lo' failed make[4]: *** [framing.lo] Error 1 Makefile:57: recipe for target 'libs' failed make[3]: *** [libs] Error 1 Makefile:102: recipe for target 'nvram' failed make[2]: *** [nvram] Error 1 Makefile:93: recipe for target 'apps' failed make[1]: *** [apps] Error 1 Makefile:44: recipe for target 'source' failed make: *** [source] Error 2 Makefile:32: recipe for target 'sources' failed make: *** [sources] Error 2

Any ideas what could be causing this?

Thanks alot for this amazing project and your hard work.

Daniel

Compatibility with OpenWRT packages

As determined for #6 and #10, some base dependencies are required if we are to use any OpenWRT opkg package binaries on the anc/D7000.

Tried this:
To /etc/opkg.conf I added the arm_cortex-a9 architecture and OpenWRT package source mirror:

arch arm_cortex-a9 4
src/gz openwrt_arm_base http://ba.mirror.garr.it/mirrors/openwrt/releases/17.01.4/packages/arm_cortex-a9/base
src/gz openwrt_arm_packages http://ba.mirror.garr.it/mirrors/openwrt/releases/17.01.4/packages/arm_cortex-a9/packages

And ran opkg update
Then opkg install usb-modeswitch

Produced errors:

 * calculate_dependencies_for: Cannot satisfy the following dependencies for usb-modeswitch:
 *      libc *  libc *  libc *  libc *  libc *  libpthread *    librt *
 * opkg_solver_install: Cannot install package usb-modeswitch.

Additionally, --force-depends will ignore this and install the package, but the binaries don't run due to incompatible libc.

D7000 uses CPU: Broadcom BCM[9?]63138 @1GHZ (a DualCore ARM Cortex A9)
CPUInfo Features : swp half thumb fastmult edsp tls

Linux kernel for D7000 is: Linux version 3.4.11-rt19 (root@Debian) (gcc version 4.6.2 (Buildroot 2011.11-g00639bc-dirty) ) #2 SMP PREEMPT Wed Jan 3 09:48:00 CET 2018.
So 7 years old! Apparently this is common for embedded-linux devices due to using Broadcom SDK .

OpenWRT 15.05 still used uclibc, but then moved to musl-libc, so definitely the latest 17.x streams won't be a compatible source, but there is still a chance to find compatible binary packages from older generations (will still need --force-depends).

Cracking this would be very useful since OpenWRT offers so much. Alternative being to cross-compile many packages from source to suit D7000 will not be much fun unless that can be automated in some fashion.

opkg list-installed BUG?

Trying 192.168.0.1...
Connected to 192.168.0.1.
Escape character is '^]'.
D7000 login: admin
Password:
admin@D7000:$ opkg list-installed
ancistrus-core - 1.0.4
hdparm - 9.52
network-test - 0.1.0-270
openssh - 7.6p1-010
qos-sqm - 1.2.0-13.027
smartmontools - 6.5
utelnetd - 0.1.11
zlib - 1.2.11
admin@D7000:$ opkg install iproute2
Package iproute2 (4.16.0) installed in root is up to date.
admin@D7000:$

Differences between .48 and .50

`diff -urN /home/negan07/Desktop/D7000_V1.0.1.48_WW_src/Source/apps/bftpd-2.3/bftpd.fw.conf /home/negan07/Desktop/D7000_V1.0.1.50_WW_src/Source/apps/bftpd-2.3/bftpd.fw.conf
--- /home/negan07/Desktop/D7000_V1.0.1.48_WW_src/Source/apps/bftpd-2.3/bftpd.fw.conf 2017-03-23 17:00:09.000000000 +0100
+++ /home/negan07/Desktop/D7000_V1.0.1.50_WW_src/Source/apps/bftpd-2.3/bftpd.fw.conf 2017-06-22 15:33:12.000000000 +0200
@@ -281,8 +281,8 @@
directory "/" {
ALLOWCOMMAND_DELE="no"
ALLOWCOMMAND_STOR="no"

  • ALLOWCOMMAND_XMKD="no"
  • ALLOWCOMMAND_MKD="no"
  • ALLOWCOMMAND_XMKD="yes"
  • ALLOWCOMMAND_MKD="yes"
    ALLOWCOMMAND_APPE="no"
    ALLOWCOMMAND_XRMD="no"
    ALLOWCOMMAND_RMD="no"
    @@ -292,8 +292,8 @@
    directory "/shares" {
    ALLOWCOMMAND_DELE="no"
    ALLOWCOMMAND_STOR="no"
  • ALLOWCOMMAND_XMKD="no"
  • ALLOWCOMMAND_MKD="no"
  • ALLOWCOMMAND_XMKD="yes"
  • ALLOWCOMMAND_MKD="yes"
    ALLOWCOMMAND_APPE="no"
    ALLOWCOMMAND_XRMD="no"
    ALLOWCOMMAND_RMD="no"
    diff -urN /home/negan07/Desktop/D7000_V1.0.1.48_WW_src/Source/apps/bftpd-2.3/commands.c /home/negan07/Desktop/D7000_V1.0.1.50_WW_src/Source/apps/bftpd-2.3/commands.c
    --- /home/negan07/Desktop/D7000_V1.0.1.48_WW_src/Source/apps/bftpd-2.3/commands.c 2017-03-23 17:00:09.000000000 +0100
    +++ /home/negan07/Desktop/D7000_V1.0.1.50_WW_src/Source/apps/bftpd-2.3/commands.c 2017-06-22 15:33:20.000000000 +0200
    @@ -65,6 +65,10 @@
    #undef WANT_GZIP
    #endif

+extern int adminpwd_lan_protect ;
+extern int adminpwd_wan_protect ;
+extern int is_remote ;
+
int state = STATE_CONNECTED;
char user[USERLEN + 1];
struct sockaddr_in sa;
@@ -268,7 +272,15 @@
respond with code 230 'User logged in, proceed'. */
if (all_file_readable_writable()){
state = STATE_USER;

  •    bftpd_login("");
    
  •    if(((adminpwd_lan_protect == 1) && (is_remote==0))
    
  •   	||((adminpwd_wan_protect == 1) && (is_remote==1)))
    
  •   {
    
  •   	control_printf(SL_SUCCESS, "331 Password please.");
    
  •   }
    
  •   else
    
  •   {
    
  •   	    bftpd_login("");
    
  •   }
      /* bftpd_login(""); */
    

    }
    else {
    @@ -320,6 +332,12 @@
    }
    #endif
    #endif
    +/* It is a temp measure to fix issue that chrome can't response "331 password please" correctly*/

  • if (password && (strcmp(password, "[email protected]") == 0)) {

  •   control_printf(SL_FAILURE, "530 Login incorrect.");
    
  •   state = STATE_CONNECTED;
    
  • }

  • if (bftpd_login(password)) {
    bftpd_log("Login as user '%s' failed.\n", user);
    control_printf(SL_FAILURE, "530 Login incorrect.");
    @@ -1540,6 +1558,13 @@
    if (pre_write_script)
    run_script(pre_write_script, mapped);

  •   // forbid mkdir in "/" or "/shares/" directory.
    
  •   if (strlen(mapped) <= (strlen(dirname) + 8))
    
  •   {
    
  •       control_printf(SL_FAILURE, "451 Error: Unable to create directory.");
    
  •       return;
    
  •  }
    
  • if (mkdir(mapped, 0777)) {
    bftpd_log("Error: '%s' while trying to create directory '%s'.\n",
    strerror(errno), dirname);
    @@ -1693,6 +1718,15 @@
    }
    /* mapped = bftpd_cwd_mappath(strdup(strchr(params, ' ') + 1)); */
    mapped = bftpd_cwd_mappath(my_string);

  •   // forbid chmod in "/" or "/shares/" directory.
    
  •   if (strlen(mapped) <= (strlen(my_string) + 8))
    
  •   {
    
  •        free(my_string);
    
  •       control_printf(SL_FAILURE, "550: An error occured on the server trying to CHMOD.");
    
  •       return;
    
  •   }
    
  •    free(my_string);
      
       if (pre_write_script)`
    

`diff -urN /home/negan07/Desktop/D7000_V1.0.1.48_WW_src/Source/apps/dnrd-2.19/src/master.c /home/negan07/Desktop/D7000_V1.0.1.50_WW_src/Source/apps/dnrd-2.19/src/master.c
--- /home/negan07/Desktop/D7000_V1.0.1.48_WW_src/Source/apps/dnrd-2.19/src/master.c 2017-03-23 17:02:21.000000000 +0100
+++ /home/negan07/Desktop/D7000_V1.0.1.50_WW_src/Source/apps/dnrd-2.19/src/master.c 2017-06-23 13:16:45.000000000 +0200
@@ -66,6 +66,8 @@
#define NTGR_APPS_URL1 "www.netgear.com"
#endif

+#define NTGR_APPS_URL_TEMP "http.updates1.netgear.com"
+
typedef struct _string {
unsigned int code;
char *string;
@@ -481,7 +483,8 @@
if (( (access("/tmp/blank_state.out",F_OK)==0) || (access("/tmp/dnshj.out",F_OK)==0) || (access("/tmp/brs_hijack.out",F_OK)==0))
&& do_hack_dns && (rec->type == DNS_NAMEIP) &&
//if (do_hack_dns && (rec->type == DNS_NAMEIP) &&

  •   (strcmp(rec->object.string, hack_dns_name) == 0)
    
  •   //(strcmp(rec->object.string, hack_dns_name) == 0)
    
  •   (strcmp(rec->object.string, hack_dns_name) == 0) && (strcmp(name,NTGR_APPS_URL_TEMP)!=0)
    

#ifdef GUI_V14
&& (strcmp(name, NTGR_APPS_URL) != 0)
&& (strcmp(name, NTGR_APPS_URL1) != 0)
diff -urN /home/negan07/Desktop/D7000_V1.0.1.48_WW_src/Source/apps/dnrd-2.19/src/udp.c /home/negan07/Desktop/D7000_V1.0.1.50_WW_src/Source/apps/dnrd-2.19/src/udp.c
--- /home/negan07/Desktop/D7000_V1.0.1.48_WW_src/Source/apps/dnrd-2.19/src/udp.c 2017-03-23 17:02:21.000000000 +0100
+++ /home/negan07/Desktop/D7000_V1.0.1.50_WW_src/Source/apps/dnrd-2.19/src/udp.c 2017-06-23 13:36:12.000000000 +0200
@@ -32,6 +32,7 @@
#include <string.h>
#include <time.h>
#include <assert.h>
+#include <unistd.h>
#include "common.h"
#include "relay.h"
#include "cache.h"
@@ -65,6 +66,34 @@
} RR_t;
#pragma pack(pop)

+#include <stdarg.h>
+static int print_console_func(const char *format, ...)
+{

  • if (access("/tmp/debug_dnrd_console", F_OK) == 0)
  • {
    +#if 1
    +#define CONSOLE "/dev/console"
  •   static FILE* fp = NULL;
    
  •   va_list arg;
    
  •   if(fp == NULL)
    
  •   {
    
  •   	fp = fopen(CONSOLE, "w");
    
  •   	if(fp == NULL)
    
  •   	{
    
  •   		printf("can't open %s \n", CONSOLE);
    
  •   		return 0;
    
  •   	}
    
  •   }
    
  •   va_start(arg, format);
    
  •   vfprintf(fp, format, arg);
    
  •   va_end(arg);
    

+#endif

  • }
  • return 0;
    +}

int SYSTEM(const char *format, ...)
{
char buf[SYSTEM_BUF_SIZE]="";
@@ -379,6 +408,75 @@
}

#ifdef GUI_V14
+
+
+#define ANSWER_IP_MAX 100
+char answer_ip[ANSWER_IP_MAX][32];
+
+/* get dns answer from reply pkts */
+uint32_t get_answer_ip(char *data, int len, int answered_count)
+{

  • int ret = 0;
  • RR_t dns_rr;
  • char *pt = data;
  • int i = 0, offset;
  • int parsered_count = 0, got_answered_count = 0;
  • uint32_t ret_ip = 0;
  • /* prepare data, eat dns query part */
  • while(*pt != 0)
  •   pt ++;
    
  • pt = pt + 5;
  • while(i + sizeof(dns_rr) < len)
  • {
  •   memcpy(&dns_rr, pt, sizeof(dns_rr));
    
  •   parsered_count ++;
    
  •   /* the answer is ipv4 address */
    
  •   if(ntohs(dns_rr.rr_type) == 1)
    
  •   {
    
  •   	if(i + sizeof(dns_rr) + 4 <= len)
    
  •   	{
    
  •   		pt = pt + sizeof(dns_rr);
    
  •   		memcpy(&ret_ip, pt, 4);
    
  •   		{
    
  •   			struct in_addr ip_ans;
    
  •   			ip_ans.s_addr = ret_ip;
    
  •   			strcpy(&answer_ip[got_answered_count ++][0], inet_ntoa(ip_ans));
    
  •   			print_console_func("get response %d: %s\n", answered_count, inet_ntoa(ip_ans));
    
  •   			if (got_answered_count >= ANSWER_IP_MAX)
    
  •   			{
    
  •   				print_console_func("no enough space\n");
    
  •   				break;	
    
  •   			}
    
  •   		}
    
  •   		ret = 1;
    
  •   		if (parsered_count >= answered_count)
    
  •   		{
    
  •   			print_console_func("get all response\n");
    
  •   			break;	
    
  •   		}
    
  •   		pt += 4;
    
  •   	}
    
  •   	//break;
    
  •   }
    
  •   else
    
  •   {
    
  •   	offset = ntohs(dns_rr.rr_length) + sizeof(dns_rr);
    
  •   	if((i = i + offset) <= len)
    
  •   	{
    
  •   		/* Go to the next record */
    
  •   		pt = pt + offset;
    
  •   	}
    
  •   }
    
  • }
  • return ret;
    +}

+#if 0
/* get dns answer from reply pkts */
uint32_t get_answer_ip(char *data, int len)
{
@@ -417,6 +515,7 @@
return ret_ip;
}
#endif
+#endif

/*

  • handle_udpreply()
    @@ -435,6 +534,8 @@
    unsigned addr_len;
    query_t *q = prev->next;
    int reply;
  • int answerip_i = 0;

  • int ret = 0;

    log_debug(3, "handling socket %i", q->sock);
    if ((len = reply_recv(q, msg, UDP_MAXSIZE)) < 0)
    @@ -527,7 +628,8 @@
    {
    sprintf_cname(&msg[12], len-12, buf, 256);

  •   if(strcmp(buf,"updates1.netgear.com")==0)
    
  •   //if(strcmp(buf,"updates1.netgear.com")==0)
    
  •   if(strcmp(buf,"updates1.netgear.com")==0 || strcmp(buf,"http.updates1.netgear.com")==0)
      {
      	state = nvram_safe_get("config_state");
      	if( strcmp(state,"configured")==0 || strcmp(state,"blankstate")==0)
    

@@ -544,6 +646,33 @@
*/
struct in_addr ip_ans;
char ip1[32] = "";
+
+

  •   		memset(&answer_ip[0][0], 0, sizeof(answer_ip));
    
  •   		ret = get_answer_ip(&msg[12], len - 12, ntohs(((dnsheader_t *)msg)->ancount));
    
  •   		if(ret)
    
  •   		{
    
  •   			for (answerip_i=0; answerip_i<ANSWER_IP_MAX; answerip_i++)
    
  •   			{
    
  •   				memset(ip1, 0, sizeof(ip1));
    
  •   				strcpy(ip1, &answer_ip[answerip_i][0]);
    
  •   				if(ip1[0] && strcmp(ip1,"66.114.62.22")!=0 && 
    
  •   					strcmp(ip1,"66.114.62.29")!=0 && 
    
  •   					strcmp(ip1,"174.35.24.133")!=0 && 
    
  •   					strcmp(ip1,"101.96.10.64")!=0)
    
  •   				{
    
  •   						for(group_id = group_sid; group_id <= group_eid; group_id ++)
    
  •   					{
    
  •   						{
    
  •   							SYSTEM("/usr/sbin/iptables -t nat -D  PREROUTING -i group%d -d %s -p tcp --dport 80 -j RETURN", group_id,  ip1);
    
  •   							SYSTEM("/usr/sbin/iptables -t nat -I  PREROUTING -i group%d -d %s -p tcp --dport 80 -j RETURN", group_id, ip1);
    
  •   						}
    
  •   					}
    
  •   				}
    
  •   			}
    
  •   		}
    

+/*
ip_ans.s_addr = get_answer_ip(&msg[12], len - 12);
if(ip_ans.s_addr != 0)
{
@@ -557,6 +686,7 @@
}
}
}

  •   		*/
    

/*
if(strcmp(ip2,"66.114.62.22")!=0 && strcmp(ip2,"66.114.62.29")!=0 && strcmp(ip2,ip1)!=0 && strcmp(ip2,"174.35.24.133")!=0)
{`

`diff -urN /home/negan07/Desktop/D7000_V1.0.1.48_WW_src/Source/apps/mini_httpd-1.17beta1/mini_httpd.c /home/negan07/Desktop/D7000_V1.0.1.50_WW_src/Source/apps/mini_httpd-1.17beta1/mini_httpd.c
--- /home/negan07/Desktop/D7000_V1.0.1.48_WW_src/Source/apps/mini_httpd-1.17beta1/mini_httpd.c 2017-03-27 17:13:40.000000000 +0200
+++ /home/negan07/Desktop/D7000_V1.0.1.50_WW_src/Source/apps/mini_httpd-1.17beta1/mini_httpd.c 2017-06-22 15:33:28.000000000 +0200
@@ -1458,8 +1458,8 @@
if( ((strstr(path,".gif")!=NULL) || (strstr(path,".css") !=NULL) || (strstr(path,".js") != NULL)
|| (strstr(path,".xml") != NULL)
|| (strstr(path,".jpg") != NULL))

  •    //avoid a url like "xxx.htm/xxxx.js, this can skip auth"
    
  •   && ((strstr(path, ".htm") == NULL) && (strstr(path, ".html") == NULL) && (strstr(path, ".asp") == NULL))
    
  •    //avoid a url like "xxx.htm/xxxx.js, this can skip auth"                                                       //PSV-2017-2212
    
  •   && ((strstr(path, ".htm") == NULL) && (strstr(path, ".html") == NULL) && (strstr(path, ".asp") == NULL) && (strstr(path, "todo=") == NULL))
      )
       return 1;
    

@@ -2490,6 +2490,13 @@

 if ( lstat( buf, &sb ) < 0 )
 return ""; /* don't show  "???" to end user. --billGuo */
  • /* Do not show symlink file or directory in USB directory */
  • if(is_usb_session && S_ISLNK(sb.st_mode))
  • {
  •   if( strlen(name) && strstr(dir, "shares/") )
    
  •   	return "";
    
  • }
    //(void) strftime( f_time, sizeof( f_time ), "%d%b%Y %H:%M", localtime( &sb.st_mtime ) );
    (void) strftime( f_time, sizeof( f_time ), "%A, %B %d, %Y %l:%M %p", localtime( &sb.st_mtime ) );
    strencode( encname, sizeof(encname), name );
    @@ -3567,6 +3574,12 @@
    buflen = snprintf( buf, sizeof(buf), "Last-Modified: %s\r\n", timebuf );
    add_to_response( buf, buflen );
    }
  • snprintf(buf, sizeof(buf), "X-Frame-Options: SAMEORIGIN\015\012");
  • add_to_response( buf, buflen );
  • snprintf(buf, sizeof(buf), "X-XSS-Protection: 1;mode=block\015\012");
  • add_to_response( buf, buflen );
  • snprintf(buf, sizeof(buf), "X-Content-Type-Options: nosniff\015\012");
  • add_to_response( buf, buflen );
    buflen = snprintf( buf, sizeof(buf), "Connection: close\r\n\r\n" );
    add_to_response( buf, buflen );
    }
    @@ -4629,14 +4642,98 @@
    return 0;
    }

+int is_usb_subdir_file(const char *dir)
+{

  • if(dir && *dir)
  • {
  •   if( strstr(dir, "shares/USB_Storage")
    
  •        && (strlen(dir) > strlen("shares/USB_Storage/")))
    
  •        return 1;
    
  •    if((strstr(dir, "shares/") && strstr(dir, "_Drive"))
    
  •        && (strlen(dir) > strlen("shares/T_Drive/"))) 
    
  •        return 1;
    
  • }
  • return 0;
    +}

+int is_symlink(char *buf)
+{

  • struct stat sb2;
  • if(lstat(buf, &sb2) < 0)
  •   return 0;
    
  • if(S_ISLNK(sb2.st_mode))
  •   return 1;
    
  • else
  •   return 0;  
    

+}
+
+int usb_subdir_is_symlink(char *buf)
+{

  • char *p = buf;
  • int i = 0;
  • while(*p)
  • {
  •    p = strchr(p, '/');
    
  •    if(p == NULL)
    
  •        return 0;
    
  •    /* shares/USB_Storage/ or shares/x_Drive/xxx/ ,so skip two */
    
  •    if( i > 1)
    
  •    {
    
  •        /* begin process 3nd, 4th ...  */
    
  •        *p = '\0';
    
  •        if(is_symlink(buf))
    
  •            return  1;
    
  •        else
    
  •            *p = '/';
    
  •    }
    
  •    i++;
    
  •    p++;
    
  • }
  • return 0;
    +}

static int is_readable(const char *dir, const char *name)
{
FILE *fp = NULL;
char dir_a[2048]={0,}, auth[64];

  • static char buf[2048];
  • static char buf[2048]={0};
    struct usb_user_t *user;
    char tmp[2048],real_path[2056];
    struct stat stat_mine;
  • if(is_usb_subdir_file(dir))
  • {
  •    /* If it is link, we will think it is  not read*/
    
  •    if(strlen(dir) > sizeof(buf))
    
  •        strncpy(buf, dir, sizeof(buf)-1);
    
  •    else
    
  •        strcpy(buf, dir);
    
  •    if(buf[strlen(buf)-1] == '/')
    
  •    {
    
  •        buf[strlen(buf)-1]='\0';
    
  •    }
    
  •    if(is_symlink(buf))
    
  •    {
    
  •        return 0;
    
  •    }
    
  •    else
    
  •    {
    
  •        /* fully path is not symlink, but the path directory will be symlink
    
  •            such as shares/USB_Storage/tmp/ntp_start is a real file
    
  •            but shares/USB_Storage/tmp is symlink, so we need check the 		directory path whether own symlink
    
  •        */
    
  •        if(usb_subdir_is_symlink(buf))
    
  •        {
    
  •            return 0;
    
  •        }
    
  •    }
    
  • }
  • memset(buf, 0, sizeof(buf));
  • user = usb_user_lookup(remote_ip);
    SC_CFPRINTF("####DEBUG dir=<%s>, name=<%s>\n",dir,name);
    if(*(dir+strlen(dir)-1) != '/')`

Google Chrome can not access Admin Page 192.168.0.1 due to Nulls in Header

Anyone using Chromium (Google Chrome, or other derivatives) version 72 (or above), can not access a D7000 Admin page. If you type 192.168.0.1 in the URL Bar of Chrome, you will get an error page which reads "ERR_INVALID_HTTP_RESPONSE"

Firmware version installed = D7000_V1.0.1.70_1.0.1

See the following topics for reference ..

https://bugs.chromium.org/p/chromium/issues/detail?id=929170

https://bugs.chromium.org/p/chromium/issues/detail?id=927364

https://community.netgear.com/t5/DSL-Modems-Routers/GOOGLE-CHROME-ERROR-PAGE-DUE-TO-NULLS-IN-HEADER-OF-ROUTER/m-p/1701839#M26062

Example of NULLs being returned causing the issue ..

HTTP/1.1 401 Unauthorized Set-Cookie: <not including this here, though it's just a session token> Server: Date: Thu, 07 Feb 2019 04:56:14 GMT WWW-Authenticate: Basic realm="NETGEAR D7000" Content-Type: text/html Content-Language: en-US,en;q=0.9 X-Frame-Options: SAMEORIGIN <NULL>9 X-XSS-Protection: 1;mode=block <NULL> X-Content-Type-Options: nosniff <NULL>Connection: close

Because the NULL characters are none Spec, Google Chromium project developers will not fix the issue (which would necessitate reverting Chrome to accepting NULLs), because from Googles point of view they are not only none spec, they are also a potential security risk.

Netgear have now end of life on D7000v1 and will also not fix the issue with the official firmware.

Its possible also that other browsers (Edge, Firefox) will also follow suit in not allowing NULLs to be accepted, so in future the D7000 can only be supported by the Netgear Genie, which is not Linux compatible (I think anyway), and woefully inadequate for advanced use.

Could you please take a look at this issue and possibly fix it ?

See comments 26 and 42 for pointers on what to fix, here
https://bugs.chromium.org/p/chromium/issues/detail?id=927364

And see comment 44 closes the issue on Chromium as a "Wont Fix".

noip problem when updating multiple hostnames

I am using the DNS service provided by No-IP since two years now with a QNAP x86 NAS situated in another city. Yesterday I added a second hostname in my No-IP account and setted that DNS in my D7000 (build 454) in my actual home, 80 km away from the NAS, to set up an automatic backup routine using Rsync... and at this point I noticed a strange behaviour: everytime the D7000 updated the IP, both hostname's IP get updated in No-IP, changing also the one of the QNAP. Consequently, the NAS became inaccessible until QTS update his IP's hostname again.
Otherwise, when the public IP changes on the branded router connected to the QNAP, the NAS correctly updates only the IP connected to his specific hostname.

Seems like this is a know problem at Netgear, at least from firmware 1.0.1.60, see here:

https://community.netgear.com/t5/DSL-Modems-Routers/D7000-Dynamic-DNS-feature-clobbers-all-No-IP-Hostnames/m-p/1683907#M25789

Guess what... Netgear is ignoring the issue at the moment!

Is there a way to fix the DNRD so that only the correct hostname is updated when the D7000 public IP changes?

Thanks for all the work you keep doing!

Giorgio

Dev platform moved to Debian 9.x

Due to libc version lacks on last stages, starting from master commit #174 the development platform is moved from Ubuntu Yakkety to Debian Stretch.

Driver XDSL

With the latest build 370 it is no longer possible to install the new drivers xdsl A2pvbH042u?

Mobile Broadband 3G dongle

Thanks @negan07! Like others, I am a bit frustrated at the pace of firmware development from Netgear for what seems to be very capable hardware. Yet, I am pleased to find their code released under GPL and you already created a GitHub. Also very happy to follow your wiki to find I can telnet to the D7000 through 'debug' mode to explore and tinker around.

I am very interested to see if we could do more with the USB ports:

  1. 3G/4G USB Dongle for Mobile Broadband Internet failover if VDSL drops. Perhaps some partial OpenWRT functions?
  2. Integrated UPS monitoring/alerting through NUT

D7000 uses CPU: Broadcom BCM[9?]63138 @1GHZ (DualCore ARM Cortex A9)
CPUInfo Features : swp half thumb fastmult edsp tls

Further reading:
https://wiki.openwrt.org/doc/hardware/soc/soc.broadcom.bcm63xx
https://github.com/networkupstools/nut/

I am no expert and don't have much time, but have some systems/programming background so will try to follow your lead to share what I can.

Regards,
David

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.