Восстановление доступа к web-морд

Post new topic   Reply to topic    DD-WRT Forum Index -> Использование и установка DD-WRT
Author Message
Neand
DD-WRT Novice


Joined: 17 Sep 2014
Posts: 4

PostPosted: Wed Sep 17, 2014 16:40    Post subject: Восстановление доступа к web-морд Reply with quote
Для включения доступа по HTTP (оставляю только HTTPS) по ошибке кликнул не туда и отключил ещё иHTTPS (и не обратил внимания, когда тыкал "Применить"). Теперь к web-морде нет доступа вообще. Sad
Помогите восстановить. Доступ к консоли SSH есть.

P.S. Нашёл в файле /etc/config/base.webconfig упоминание про http и https, но что-то сделать не смог (да и не знаю, помогло бы) - файл недоступен для записи.
Sponsor
Neand
DD-WRT Novice


Joined: 17 Sep 2014
Posts: 4

PostPosted: Wed Sep 17, 2014 17:39    Post subject: Re: Восстановление доступа к web-мо Reply with quote
Neand wrote:
Помогите восстановить. Доступ к консоли SSH есть.

Разобрался. Наличие доступа - самое главное, когда есть Линь. Wink
Code:
# nvram set http_enable=1
# nvram set https_enable=1

Как много интересного, если ковырнуть. WinkWinkWink
Помогла статья на сайте IBM в разделе "для разработчиков": "Как с помощью DD-WRT дополнить возможности беспроводного маршрутизатора функционалом Linux", из которой узнал про команду mvram. Very Happy
podrivnick
DD-WRT Novice


Joined: 17 Aug 2014
Posts: 4

PostPosted: Thu Sep 25, 2014 4:12    Post subject: Re: Восстановление доступа к web-мо Reply with quote
Quote:

https_enable=1
remote_mgt_https=1

Ребята, прошу совета: у меня нет доступа по https-у ни снаружи ни из локальной сети.
и в конфиге и веб морде видно что доступ разрешен.
порты пробовал ставить разные - это не помогло.
при этом http работает как в локалке, так и (если разрешить) снаружи.

Firmware: DD-WRT v24-sp2 (06/23/14) std
устройство TP-Link TL-WR1043ND 1.x

и такое ощущение, что до этого фирмваря работал хттпс.
хотел было сделать даунгрейд - но устройство не шъется на ПО более старых версий
vasek00
DD-WRT Guru


Joined: 06 Nov 2010
Posts: 3312

PostPosted: Thu Sep 25, 2014 5:11    Post subject: Re: Восстановление доступа к web-мо Reply with quote
Без проблем все работает, по крайней мере на 2014-06-23 локальный доступ с ПК:
Code:
root@My:~# ps | grep http
 1103 root      3512 S    httpd -p 80
 1172 root      4040 S    httpd -S
root@My:~#

попал на страницу роутера -> https://192.168.1.1
Так же в Status -> https://192.168.1.1/Status_Router.asp
Network - Active IP Connections есть соединения на 443 порт.
podrivnick
DD-WRT Novice


Joined: 17 Aug 2014
Posts: 4

PostPosted: Thu Sep 25, 2014 6:26    Post subject: Re: Восстановление доступа к web-мо Reply with quote
хм, а у меня нет httpd -S
Code:

root@DD-WRT:~# ps | grep http
  931 root      2328 S    httpd -p 80
 1946 root      1124 S    grep http
root@DD-WRT:~#

Не запускается автоматом?
Можете напомнить какой командой его запустить?
vasek00
DD-WRT Guru


Joined: 06 Nov 2010
Posts: 3312

PostPosted: Thu Sep 25, 2014 10:15    Post subject: Re: Восстановление доступа к web-мо Reply with quote
podrivnick wrote:
хм, а у меня нет httpd -S
Code:

root@DD-WRT:~# ps | grep http
  931 root      2328 S    httpd -p 80
 1946 root      1124 S    grep http
root@DD-WRT:~#

Не запускается автоматом?
Можете напомнить какой командой его запустить?

как написано так и запускайте :
Code:
httpd -S &

Перезапустите роутер, должна служба запускаться по ключу :
Code:
https_enable=1
podrivnick
DD-WRT Novice


Joined: 17 Aug 2014
Posts: 4

PostPosted: Thu Sep 25, 2014 10:46    Post subject: Re: Восстановление доступа к web-мо Reply with quote
а https_enable=1 в кофиге стоит, но httpd -S не запущен.
выполнил и получил
Code:

root@DD-WRT:~# httpd -S &
root@DD-WRT:~# ps | grep http
892 root      2520 S    httpd -p 80
[1]+  Segmentation fault         httpd -S


что то не то, сброс на заводские не помогает Sad
"перепрошивка" этой же фирмарью не выполняется , видимо из за того что они идентичны.

Для себя вижу только "самурайский" путь - попробовать перешить на стоковую и обратно в dd-wrt.

Или есть другой - более рациональный путь?
vasek00
DD-WRT Guru


Joined: 06 Nov 2010
Posts: 3312

PostPosted: Fri Sep 26, 2014 4:34    Post subject: Re: Восстановление доступа к web-мо Reply with quote
Ну если самурайский то
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=85237
Neand
DD-WRT Novice


Joined: 17 Sep 2014
Posts: 4

PostPosted: Sat Oct 25, 2014 15:27    Post subject: Re: Восстановление доступа к web-morde Reply with quote
vasek00 wrote:
Ну если самурайский то
http://www.dd-wrt.com/phpBB2/viewtopic.php?t=85237

А для случая в полной потерей доступа к управления? Sad
В прошлый раз, когда потерял доступ по своей ошибке (начало темы) я разобрался, как восстановить, но тогда у меня был доступ по SSH.
После этого я заодно решил перепрошить обновлённой версией, нашёл на сайте для своего Netgear WNR3500U/L
dd-wrt.v24-21061_NEWD-2_K2.6_std_usb_nas.bin
Обновилось без проблем, работало: что-то поднастроил, сохранил конфиг.
Некоторое время не трогал, а сейчас понадобилось - не смог: ни браузером (HTTPS), ни консольно (SSH). Причём на 443 (HTTPS) порт телнетом цеподключаюсь:
Code:
$ telnet 192.168.1.1 443
Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.

Connection closed by foreign host.

но далее - ничего.
Тоже самое - с SSH: телнетом есть содениение:
Code:
$ telnet 192.168.1.1 22
Trying 192.168.1.1...
Connected to 192.168.1.1.
Escape character is '^]'.
SSH-2.0-dropbear_2013.56

Connection closed by foreign host.

но тоже бестолку.
С отладкой такая ситуация:
Code:
$ ssh -vv 192.168.1.1
OpenSSH_6.4, OpenSSL 1.0.1e-fips 11 Feb 2013
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 51: Applying options for *
debug2: ssh_connect: needpriv 0
debug1: Connecting to 192.168.1.1 [192.168.1.1] port 22.
debug1: Connection established.
debug1: identity file /home/neand/.ssh/id_rsa type -1
debug1: identity file /home/neand/.ssh/id_rsa-cert type -1
debug1: identity file /home/neand/.ssh/id_dsa type -1
debug1: identity file /home/neand/.ssh/id_dsa-cert type -1
debug1: identity file /home/neand/.ssh/id_ecdsa type -1
debug1: identity file /home/neand/.ssh/id_ecdsa-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.4
debug1: Remote protocol version 2.0, remote software version dropbear_2013.56
debug1: no match: dropbear_2013.56
debug2: fd 3 setting O_NONBLOCK
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: kex_parse_kexinit: ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie
-hellman-group1-sha1
debug2: kex_parse_kexinit: ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,ssh-rsa-cert-v01@openssh.com,ssh-dss-cer
t-v01@openssh.com,ssh-rsa-cert-v00@openssh.com,ssh-dss-cert-v00@openssh.com,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256
-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-gcm@openssh.com,aes256-gcm@openssh.com,aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc,aes192-cbc,aes256
-cbc,arcfour,rijndael-cbc@lysator.liu.se
debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hma
c-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hm
ac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: hmac-md5-etm@openssh.com,hmac-sha1-etm@openssh.com,umac-64-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-512-etm@openssh.com,hma
c-ripemd160-etm@openssh.com,hmac-sha1-96-etm@openssh.com,hmac-md5-96-etm@openssh.com,hmac-md5,hmac-sha1,umac-64@openssh.com,umac-128@openssh.com,hmac-sha2-256,hmac-sha2-512,hmac-ripemd160,hm
ac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit: none,zlib@openssh.com,zlib
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: kex_parse_kexinit: diffie-hellman-group1-sha1,diffie-hellman-group14-sha1
debug2: kex_parse_kexinit: ssh-rsa,ssh-dss
debug2: kex_parse_kexinit: aes128-ctr,3des-ctr,aes256-ctr,aes128-cbc,3des-cbc,aes256-cbc,twofish256-cbc,twofish-cbc,twofish128-cbc
debug2: kex_parse_kexinit: aes128-ctr,3des-ctr,aes256-ctr,aes128-cbc,3des-cbc,aes256-cbc,twofish256-cbc,twofish-cbc,twofish128-cbc
debug2: kex_parse_kexinit: hmac-sha1-96,hmac-sha1,hmac-md5
debug2: kex_parse_kexinit: hmac-sha1-96,hmac-sha1,hmac-md5
debug2: kex_parse_kexinit: zlib,zlib@openssh.com,none
debug2: kex_parse_kexinit: zlib,zlib@openssh.com,none
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit:
debug2: kex_parse_kexinit: first_kex_follows 0
debug2: kex_parse_kexinit: reserved 0
debug2: mac_setup: found hmac-md5
debug1: kex: server->client aes128-ctr hmac-md5 none
debug2: mac_setup: found hmac-md5
debug1: kex: client->server aes128-ctr hmac-md5 none
debug2: dh_gen_key: priv key bits set: 138/256
debug2: bits set: 1009/2048
debug1: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
Connection closed by 192.168.1.1

Похоже, ситуация одинаковая с такой:
SSH drop connection
Сборок для моего роутера, новее 21061 - нет7 Откатываться на 14896? Но еслии так, то как это (откатку) сделать?
vasek00
DD-WRT Guru


Joined: 06 Nov 2010
Posts: 3312

PostPosted: Sun Oct 26, 2014 6:26    Post subject: Re: Восстановление доступа к web-morde Reply with quote
Code:
А для случая в полной потерей доступа к управления?


Кнопка "ресет" к заводским.
Или восстановление через TFTP смотрите для вашего роутера в интернете.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Использование и установка DD-WRT All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum