Ansuel / tch-nginx-gui

Modified file to apply to a stock technicolor GUI
GNU General Public License v3.0
343 stars 52 forks source link

Wifi settings reset to defaults upon reboot - DJA0231 v9.4.97-8cb5fc24 #842

Open Anach opened 4 years ago

Anach commented 4 years ago

This has been an issue since I first upgraded the modem. Upon every reboot, the primary wifi channels get reset to their default (Telstra) wifi names and passwords.

Ansuel commented 4 years ago

@Anach i need

ls /etc/uci-defaults/ Also a dump of the firmware

dd if=/dev/mtd3 of=/tmp/mtd3 and give me file in /tmp/mtd3 uploading it to any service you want (if you don't have one... use we transfer.com )

FrancYescO commented 4 years ago

ls /etc/uci-defaults/

https://github.com/Ansuel/tch-nginx-gui/issues/768#issuecomment-534419142

FW are here, OSCK, already exposed, idk exactly the @Anach's firmware https://hack-technicolor.readthedocs.io/en/stable/Firmware%20Repository/#dja0231-vcnt-a

Ansuel commented 4 years ago

my bad... we need to check firmware then... some shit in init 100%

Anach commented 4 years ago

So you don't need my firmware dump?

FrancYescO commented 4 years ago

Just say the exact version you are using

Ansuel commented 4 years ago

@Anach i need one thing... if it's not a problem...

Reboot your modem and give me a logread as soon as you connect and you notice your wifi name changed to default...

I find the script but i need to understand who runs it... also you have cwmp enabled?

Anach commented 4 years ago

@FrancYescO vcnt-a_CRF947-18.1.c.0347-950-RC

@Ansuel CWMP is disabled. I hope this is the log you wanted. The WiFi settings are set before I get to login to the webui. https://gist.github.com/Anach/ed160289c0f517dff5a3d46e647bd689 FYI. I replaced my extIP with 000.000.000.000.

I also noticed a minor issues. My hostname, while set to "gateway", is still showing as .modem on clients, instead of .gateway.

Ansuel commented 4 years ago

@Anach uci show multiap

kevdagoat commented 4 years ago

@Ansuel

I think multiap is for the Telstra “wifi booster” product they are selling

Sent from my iPhone

On 6 Oct 2019, at 6:20 pm, Ansuel Smith notifications@github.com wrote:

@Anach uci show multiap

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

Ansuel commented 4 years ago

to me multiap is the culprit of the wifi reset... I wonder if the wifi booster thing is just some sort of band steering...

kevdagoat commented 4 years ago

I think it is responsible for creating all of the AP’s during boot.

It scans for booster wifi and sets up the booster I presume.

Sent from my iPhone

On 7 Oct 2019, at 7:04 am, Ansuel Smith notifications@github.com wrote:

to me multiap is the culprit of the wifi reset... I wonder if the wifi booster thing is just some sort of band steering...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

Ansuel commented 4 years ago

Can you explain me what is the booster wifi ?

Ansuel commented 4 years ago

MY GOD JUST KILL ME... their wifi booster is just multiple ap with same wifi ap name and password... this is a joke...........
Anyway to me it's not a valid reason to limit user to use their name and default password...

Then i think i can confirm multiap is the one that reset wifi name and password...

kevdagoat commented 4 years ago

Yep hahaha.

https://www.telstra.com.au/internet/extras/wifi-extender

On 7 Oct 2019, at 7:12 am, Ansuel Smith notifications@github.com wrote:

MY GOD JUST KILL ME... their wifi booster is just multiple ap with same wifi ap name and password... this is a joke........... Anyway to me it's not a valid reason to limit user to use their name and default password...

Then i think i can confirm multiap is the one that reset wifi name and password...

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

Anach commented 4 years ago

In that case, that's ridiculous, but typical for Telstra. I was thinking of getting one of those boosters. I've changed the settings in multitap for 'cred0' and that has fixed both bands. It's odd that none of the other wifi names get reset though.

There's another question I had related to the wifi names. I notice the Wireless card shows one of the virtual wifi names twice. Not sure why that is?

There is also a display bug with the Internet access card. Upon each reboot, the switch displays 'off', even though it's actually on.

https://i.imgur.com/qqJhtr6.jpg https://i.imgur.com/eTEoL7o.jpg

Sevio007 commented 4 years ago

Hi,

I actually use to have this same problem, but it went away when I downgraded my Firmware. However I've just upgraded my FW again and it is fixed now...

However in the Management card, under Log viewer, I keep getting a repeating "daemon.err" for the process "Multiap_Controller" with a message "[conductor][map] no caps for" then the mac address of each device.

Is this related? Also how did you change the settings of Multiap?? Could you please list the commands, I'm a noob at this sort of stuff.

Anach commented 4 years ago

Hi,

I actually use to have this same problem, but it went away when I downgraded my Firmware. However I've just upgraded my FW again and it is fixed now...

However in the Management card, under Log viewer, I keep getting a repeating "daemon.err" for the process "Multiap_Controller" with a message "[conductor][map] no caps for" then the mac address of each device.

Is this related? Also how did you change the settings of Multiap?? Could you please list the commands, I'm a noob at this sort of stuff.

I simply used WinSCP to connect to the router, browsed to /etc/config, created a backup of multiap, and edited the original with notepad++.

Sevio007 commented 4 years ago

Ah Thanks Mate,

WinSCP worked, and to think I was trying to do it all using the command line in Putty lol.

I changed 'cred1' state to "0" as im not using it and that's the one with the original Telstra name in it...

I might delete the whole line actually, but I don't want to mess it up...

Edit: I deleted all the unnecessary "cred's" so I just have 1 and 2 for my 2g and 5g networks. I also went into the wireless config and removed all the rubbish Telstra Air and Fon wifi access point names. Rebooted and all works.

btrain-git commented 4 years ago

@Sevio007 → image I asssume this is the code thats meant to be edited. I tried too but ended up messing it up and having to a config reset on the router. I could not fully understand what is meant to be changed here. Any chance you could shed a bit more light for me?

Anach commented 4 years ago

I just edited the 'cred0' ; You only need chnage the ssid and wpa_psk_key to match your custom wifi name and password.

Ansuel commented 4 years ago

The best thing would be to just disable this behavior...

rswail commented 4 years ago

Hi, further to this, I removed all of the extra wifi APs (including Guest) by:

In /etc/config/multiap:

  1. Changing the entries in multiap for cred0.ssid/wpa_psk_key and cred2.ssid/wpa_psk_key to my wifi SSID/keys.
  2. Removing cred1 (SSID BH-XXXXXX)

Disabled hotspotd service

In /etc/config/network:

  1. Removing wl0_1, wl1_1 (guest APs) and wl0_2 (Telstra Air), wl0_3 (Fon Wifi), wl1_2 (BH-XXXXXX), wl1_3 (Fon Wifi 5G)

In /etc/config/dhcp:

  1. Removing config dnsmasq 'guest'
  2. Removing config dhcp 'Guest1_private' and 'Guest1_5Ghz_private'
  3. Removing config dnsmasq 'hotspot'
  4. Removing config dhcp 'fonopen'

In /etc/config/wireless:

  1. Removing wifi-iface 'wl0_1' and wifi-ap 'ap1' (Guest 2G AP)
  2. Removing wifi-iface 'wl1_1' and wifi-ap 'ap3' (Guest 5G AP)
  3. Removing wifi-iface 'wl0_2' and wifi-ap 'ap4' (Telstra Air AP)
  4. Removing wifi-iface 'wl0_3' and wifi-ap 'ap5' (Fon Wifi AP)
  5. Removing wifi-iface 'wl1_2' and wifi-ap 'ap6' (BH-XXXXX AP)
  6. Removing wifi-iface 'wl1_3' and wifi-ap 'ap7' (Fon Wifi 5G AP)

In /etc/config/firewall:

  1. Removed zone 'Guest1' and 'Guest1_5GHz'
  2. Removed forwarding with src 'Guest1' and forwarding with src 'Guest1_5GHz'
  3. Removed rules with src or dest of Guest1 or Guest1_5Ghz

The net effect of all of this is:

  1. There are only my primary Wifi APs (no Guest, no Telstra/Fon)
  2. I've disabled the hostspot service
  3. The multiap still runs, but it only configures the APs that I want.
btrain-git commented 4 years ago

image 👆🏻where is "hotspotd service". Any chance you could give us slightly more explicit instructions. Also, I couldn't find: _wl0_3 (Fon Wifi), wl1_2 (BH-XXXXXX), wl13 (Fon Wifi 5G) though I did find the first 2.👇🏻 image thanks

rswail commented 4 years ago

I'm running the Telstra 18.1c "Champagne" firmware.

Hotspotd

The hotspotd service is one of the services in /etc/init.d I stopped it with:

/etc/init.d/hotspotd stop

Making the other changes below means that it doesn't restart at boot.

Wireless and Network Config

The wireless interfaces are defined in /etc/config/wireless. Each access point is defined as follows:

  1. For each radio type (2G and 5G) there is a "config wifi-device" section. That defines the basic wifi radios.
  2. For each wifi interface (at the network level) there is a "config wifi-iface" section. That defines whether it is operating in "ap" mode (ie Access Point).
  3. For each "ap" mode wifi interface, there is a "config wifi-ap" section. That defines the AP security etc.

To remove a Wifi Access Point, you need to remove the "config wifi-ap" section and the associated "config wifi-iface" section.

Then the /etc/config/network defines the network interfaces that sit "on top" of the interfaces defined in /etc/config/wireless as well as the fixed interfaces like ethernet and the "higher level" interfaces like ppp or ipoe that connect to your WAN. For example the "config interface 'lan'" defines a bridge that combines all of the ethernet ports together as one "logical" interface.

So the hierarchy is something like (from bottom to top) for wifi access points in /etc/config/wireless is:

The hierarchy for the network layers (from bottom to top) in /etc/config/network is:

That defines the network interfaces in the system.

Telstra hotspot and multiap

Telstra added two extra layers to this (grr):

  1. /etc/config/hotspotd and /etc/init.d/hotspotd: Runs the "hidden" Telstra hotspot that utilizes the "BH" Access Point (which is related to "extending" wifi, I'm guessing BH stands for "Back Haul" and provides the "Telstra Air" and "Fon Open" hotspots.
  2. /etc/config/multiap: Overrides configs in /etc/config/wireless to setup the hidden hotspot APs as well as reconfiguring your visible APs back to the default at each boot time.
  3. Removing the extra "config controller_credentials" sections in /etc/config/multiap stop it adding the extra APs
  4. Editing the remaining "config controller_credentials" to only cover the APs you want means when it starts, it only sets those. You should modify the "option ssid" line to define the AP's SSID and "option wpa_psk_key" to have your password.

I'm going to experiment with removing the multiap service entirely by disabling /etc/init.d/multiap.

DHCP and DNS

The final steps are to remove the extra configuration of the removed Access Points.

/etc/config/dhcp controls the allocation of IP addresses to each Access Point in the "config dhcp" sections and the way DNS works in the "config dnsmasq" sections. Removing any associated with the Telstra APs (and Guest in my case) means that it doesn't try to attach to the interfaces.

/etc/config/firewall controls the rules for the firewall. If you keep your Guest APs then you don't need to touch this.

rswail commented 4 years ago

Simplified removal of Telstra hotspot functionality:

  1. In /etc/config/hotspotd

    • In section config main 'main', set option enable to 'false' instead of 'true'
  2. In /etc/config/multiap

    • In section config global 'agent' set option enabled to '0'
    • In section config global 'controller' set option enabled to '0'
  3. In /etc/config/vendorextensions

    • In section config init 'multiap_vendorextensions' set option enable to '0'
FrancYescO commented 4 years ago

So i assume turning all of these off will fix this issue (btw better to use uci to do these changes), but all of this basically what functions will turn off? Can be something that another user could use somehow?

And particularly, why is this happening only after the install of the modded gui?

rswail commented 4 years ago

So i assume turning all of these off will fix this issue (btw better to use uci to do these changes), but all of this basically what functions will turn off? Can be something that another user could use somehow?

And particularly, why is this happening only after the install of the modded gui?

I don't know :) and using the uci command line does the same job as editing the config, but I'm more used to editing config files than doing things using a CLI interface.

As I understand it, the config in /etc/config/{wireless,network,firewall} configure the kernel level interfaces (ie what gets displayed when you type ifconfig) and what traffic passes through them.

multiap is a service that configures the multiple APs, including the backhaul and Telstra Air/Fon network ones.

hotspotd appears to actually configure the hotspot services that use the Telstra/Fon APs. It has configuration to connect to redirect URLs like `https://telstra.portal.fon.com/jcp/telstra on port 3989 and a "whitelist" of URLs like www.paypal.com and signon.bigpond.com.

So I'm guessing that hotspotd does the hotspotting, using the wifi APs like Telstra Air etc to connect.

The BH-XXXXX AP appears to be setup to be a "backhaul" for Telstra's "wifi extender", essentially a supposed back channel between wifi APs.

rswail commented 4 years ago

And particularly, why is this happening only after the install of the modded gui?

Thinking further, the multiap/hotspot functionality overrides the more general OpenWRT configuration. I'm guessing that the Telstra GUI updates the multiap config, not the generic network/wireless, whereas this GUI, which doesn't know about multiap/hotspot, makes mods that are overridden every boot.

ewaleed commented 4 years ago

Hi, further to this, I removed all of the extra wifi APs (including Guest) by:

In /etc/config/multiap:

  1. Changing the entries in multiap for cred0.ssid/wpa_psk_key and cred2.ssid/wpa_psk_key to my wifi SSID/keys.
  2. Removing cred1 (SSID BH-XXXXXX)

Disabled hotspotd service

In /etc/config/network:

  1. Removing wl0_1, wl1_1 (guest APs) and wl0_2 (Telstra Air), wl0_3 (Fon Wifi), wl1_2 (BH-XXXXXX), wl1_3 (Fon Wifi 5G)

In /etc/config/dhcp:

  1. Removing config dnsmasq 'guest'
  2. Removing config dhcp 'Guest1_private' and 'Guest1_5Ghz_private'
  3. Removing config dnsmasq 'hotspot'
  4. Removing config dhcp 'fonopen'

In /etc/config/wireless:

  1. Removing wifi-iface 'wl0_1' and wifi-ap 'ap1' (Guest 2G AP)
  2. Removing wifi-iface 'wl1_1' and wifi-ap 'ap3' (Guest 5G AP)
  3. Removing wifi-iface 'wl0_2' and wifi-ap 'ap4' (Telstra Air AP)
  4. Removing wifi-iface 'wl0_3' and wifi-ap 'ap5' (Fon Wifi AP)
  5. Removing wifi-iface 'wl1_2' and wifi-ap 'ap6' (BH-XXXXX AP)
  6. Removing wifi-iface 'wl1_3' and wifi-ap 'ap7' (Fon Wifi 5G AP)

In /etc/config/firewall:

  1. Removed zone 'Guest1' and 'Guest1_5GHz'
  2. Removed forwarding with src 'Guest1' and forwarding with src 'Guest1_5GHz'
  3. Removed rules with src or dest of Guest1 or Guest1_5Ghz

The net effect of all of this is:

  1. There are only my primary Wifi APs (no Guest, no Telstra/Fon)
  2. I've disabled the hostspot service
  3. The multiap still runs, but it only configures the APs that I want.

Thank you Rswail, I can confirm that your steps solved most of the problem, I can now restart my modem and keep my wifi settings. However, I still have one more issue. My modem has two wifi networks , Networks 1 (2ghz) and Nework 2 (5 ghz) and band steering is disabled, but when I restart the modem both networks will get the same SSID as the Network 1 (2ghz). How can I modify the config files to stop Network1 SSID from overriding Network 2 ?

ewaleed commented 4 years ago

My router version is DJA0230, Version Champagne (18.1.c) and the network SSID that get overridden every time I restart the router is located in etc\config\wireless:

config wifi-iface 'wl1' option device 'radio_5G' option mode 'ap' option state '1' option network 'lan' option reliable_multicast '0' option fronthaul '1' option ssid 'network2' <---------- Look here , how to prevent this from changing?

config wifi-ap 'ap2' option iface 'wl1' option state '1' option public '1' option ap_isolation '0' option station_history '1' option max_assoc '0' option security_mode 'wpa2-psk' option pmf 'disabled' option pmksa_cache '1' option wps_state '1' option wps_w7pbc '1' option wsc_state 'configured' option wps_credentialformat 'passphrase' option wps_ap_setup_locked '1' option acl_mode 'unlock' option acl_registration_time '60' option trace_modules ' ' option trace_level 'some' option bandsteer_id 'off' option wep_key 'XXXX' option wps_ap_pin 'XXXX' option supported_security_modes 'none wpa2 wpa2-psk wpa-wpa2 wpa-wpa2-psk' option wpa_psk_key 'mywifikey'

ewaleed commented 4 years ago

Simplified removal of Telstra hotspot functionality:

  1. In /etc/config/hotspotd
  • In section config main 'main', set option enable to 'false' instead of 'true'
  1. In /etc/config/multiap
  • In section config global 'agent' set option enabled to '0'
  • In section config global 'controller' set option enabled to '0'
  1. In /etc/config/vendorextensions
  • In section config init 'multiap_vendorextensions' set option enable to '0'

My bad, I forgot to disable the Telstra hotspots. Thank you everyone for the useful information you shared here.

ewaleed commented 4 years ago

Do I have to repeat the same steps every time I update my firmware?

falcorr commented 4 years ago

Same issue with DJA0230. FW 18.1.c.0462 + 9.5.97-ed0ff8fc

The first time I believe it only reset the 2.4GHz network's name and password. I remember the channel stayed set. Went back to TelstraXXXXX.

Second time it wiped both 2.4 and 5GHz. Name, pass, channel, probably the lot.

This doesn't include Fon / Air / Guest.

CrAy-Z-827 commented 2 years ago

Just stopped in to revive this one as it is still 'Open' I thought i had this under control then ended up in a mess following a device reboot. From what i can tell the issue is the way the interfaces are defined in multiap and wireless configuration.

I noticed that in multiap i had 'cred0' showing band of 'radio_2G' and 'radio_5Gu' , while 'cred1' was showing the band of 'radio_5Gl' and 'radio_5Gu'. I thought that was odd if they had different SSID. (Note i am using a separate SSID for 5Gig and 2.4Gig networks for "reasons".

After adjusting 'multiap' to the below, and ensuring 'wireless' was set to compatible options my unit now correctly retains settings following a reboot.

**config controller_credentials 'cred0' option state '1' option ssid 'xxxxx' option wpa_psk_key 'xxxxx' option security_mode 'wpa2-psk' option fronthaul '1' option backhaul '0' option frequency_bands 'radio_2G'

config controller_credentials 'cred1' option state '0' option ssid 'xxxxx' option wpa_psk_key 'xxxxx' option security_mode 'wpa2-psk' option fronthaul '1' option backhaul '0' option frequency_bands 'radio_5G'**

Am guessing it is something screwy with the way Telstra sets up the profiles on the unit for the defaults of having a common SSID and bandsteering enabled not being modified correctly when making changes.

Not a fix, but may be a workaround for someone??