[opensuse] FTP to a box
Hi, I wish to ftp "within the first seconds of boot" of a fritzbox router in order to check for the hw revision. Idea is, that, since EOL, a flash with openwrt is indicated and could revive the box. I am on leap15, which ftp program would allow this in the most appropriate and easy way? I guess it would be good to switch of the firewall or to use "trusted" zone for the eth when I do it. Did anybody do this in the past and could give some hint? Thank you. _________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postf�cher sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
stakanov wrote:
Hi, I wish to ftp "within the first seconds of boot" of a fritzbox router in order to check for the hw revision. Idea is, that, since EOL, a flash with openwrt is indicated and could revive the box. I am on leap15, which ftp program would allow this in the most appropriate and easy way? I guess it would be good to switch of the firewall or to use "trusted" zone for the eth when I do it. Did anybody do this in the past and could give some hint?
Assuming I have understood what it is you want, it seems to me 'ftp' is the simple answer. It is easy to script. -- Per Jessen, Zürich (6.6°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
stakanov wrote:
Hi, I wish to ftp "within the first seconds of boot" of a fritzbox router in order to check for the hw revision. Idea is, that, since EOL, a flash with openwrt is indicated and could revive the box. I am on leap15, which ftp program would allow this in the most appropriate and easy way? I guess it would be good to switch of the firewall or to use "trusted" zone for the eth when I do it. Did anybody do this in the past and could give some hint?
Assuming I have understood what it is you want, it seems to me 'ftp' is the simple answer. It is easy to script. well, it has to be a program that sends a continuous ftp request and logs in as soon as ftp becomes available. Why this terrible complicated thing? Because
In data domenica 2 dicembre 2018 10:29:19 CET, Per Jessen ha scritto: there are about 5 or more hardware revisions of the AVM Fritzbox 3370. Now, the first hardware revision is not supported by openwrt (and the box can go in the recycle bin. But I know (by opening the housing that, by the chipset I do not have hardware revision 5 (this is important because the revision had two different - incompatible with the respective fw - NAND chips. Now what is left of the problem is to make sure it is not a hardware revision 1. So the box sends an info over FTP when booting up. But only for a few seconds. In order to capture it, you need not only to send a request but to run a re-request until an answer is available. Which will contain the desired information. Once I know the revision, it is not necessary any more do this with ftp because the box is compatible with the openwrt firmware installer. I need to script that and can ftp simply do this? What do I have to set as firewall in Leap? Simply switch it off is best I guess, during operation? thank you. _________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postf�cher sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
stakanov wrote:
In data domenica 2 dicembre 2018 10:29:19 CET, Per Jessen ha scritto:
stakanov wrote:
Hi, I wish to ftp "within the first seconds of boot" of a fritzbox router in order to check for the hw revision. Idea is, that, since EOL, a flash with openwrt is indicated and could revive the box. I am on leap15, which ftp program would allow this in the most appropriate and easy way? I guess it would be good to switch of the firewall or to use "trusted" zone for the eth when I do it. Did anybody do this in the past and could give some hint?
Assuming I have understood what it is you want, it seems to me 'ftp' is the simple answer. It is easy to script.
well, it has to be a program that sends a continuous ftp request and logs in as soon as ftp becomes available.
I think maybe netcat or telnet could help with that - a loop looking to connect to port 22, once available it skips to ftp. The question is - when should this be started?
Why this terrible complicated thing? Because there are about 5 or more hardware revisions of the AVM Fritzbox 3370. Now, the first hardware revision is not supported by openwrt (and the box can go in the recycle bin. But I know (by opening the housing that, by the chipset I do not have hardware revision 5 (this is important because the revision had two different - incompatible with the respective fw - NAND chips.
Okay.
Now what is left of the problem is to make sure it is not a hardware revision 1. So the box sends an info over FTP when booting up. But only for a few seconds. In order to capture it, you need not only to send a request but to run a re-request until an answer is available. Which will contain the desired information.
You can only request this information in a short window during router boot-up?
I need to script that and can ftp simply do this? What do I have to set as firewall in Leap? Simply switch it off is best I guess, during operation? thank you.
This sounds like it will outbound from your Leap15 machine to your router, so no firewall changes required. -- Per Jessen, Zürich (7.2°C) http://www.hostsuisse.com/ - dedicated server rental in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Per Jessen wrote:
stakanov wrote:
In data domenica 2 dicembre 2018 10:29:19 CET, Per Jessen ha scritto:
stakanov wrote:
Hi, I wish to ftp "within the first seconds of boot" of a fritzbox router in order to check for the hw revision. Idea is, that, since EOL, a flash with openwrt is indicated and could revive the box. I am on leap15, which ftp program would allow this in the most appropriate and easy way? I guess it would be good to switch of the firewall or to use "trusted" zone for the eth when I do it. Did anybody do this in the past and could give some hint?
Assuming I have understood what it is you want, it seems to me 'ftp' is the simple answer. It is easy to script.
well, it has to be a program that sends a continuous ftp request and logs in as soon as ftp becomes available.
I think maybe netcat or telnet could help with that - a loop looking to connect to port 22, once available it skips to ftp. The question
s/22/21/ -- Per Jessen, Zürich (7.1°C) http://www.dns24.ch/ - your free DNS host, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
In data domenica 2 dicembre 2018 12:09:47 CET, Per Jessen ha scritto:
Per Jessen wrote:
stakanov wrote:
In data domenica 2 dicembre 2018 10:29:19 CET, Per Jessen ha scritto:
stakanov wrote:
Hi, I wish to ftp "within the first seconds of boot" of a fritzbox router in order to check for the hw revision. Idea is, that, since EOL, a flash with openwrt is indicated and could revive the box. I am on leap15, which ftp program would allow this in the most appropriate and easy way? I guess it would be good to switch of the firewall or to use "trusted" zone for the eth when I do it. Did anybody do this in the past and could give some hint?
Assuming I have understood what it is you want, it seems to me 'ftp' is the simple answer. It is easy to script.
well, it has to be a program that sends a continuous ftp request and logs in as soon as ftp becomes available.
I think maybe netcat or telnet could help with that - a loop looking to connect to port 22, once available it skips to ftp. The question
s/22/21/ So port is actually 21. The info is only available shortly after boot: From their website: Within the first seconds after power on a ftp connection needs to be established to the FRITZ!Box at 192.168.178.1 and the the following ftp commands need to be run: ftp> quote USER adam2 ftp> quote PASS adam2 ftp> binary ftp> debug ftp> passive ftp> quote SETENV linux_fs_start 0 ftp> quote MEDIA FLSH ftp> put /path/to/openwrt-lantiq-xrx200-avm_fritz3370-rev2-micron-squashfs-eva-kerne l.bin mtd1 ftp> put /path/to/openwrt-lantiq-xrx200-avm_fritz3370-rev2-micron-squashfs-eva-files ystem.bin mtd0
What they do not say is what to set in the fritzbox, I resettet to factory default and set to "exposed host" for not having problems. I took the laptop and did attribute a static ip, I granted it unlimited rights. Still I am not able to get an ftpconnect. I tried without setting internet provider and with setting "over lan" using to connect the second ethernet port of the router (as the producer said). I am overlooking something. Just do not know what. Connection "times out" but seems to be established. _________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postf�cher sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
stakanov wrote:
So port is actually 21. The info is only available shortly after boot: From their website:
Within the first seconds after power on a ftp connection needs to be established to the FRITZ!Box at 192.168.178.1 and the the following ftp commands need to be run: ftp> quote USER adam2 ftp> quote PASS adam2 ftp> binary ftp> debug ftp> passive ftp> quote SETENV linux_fs_start 0 ftp> quote MEDIA FLSH ftp> put /path/to/openwrt-lantiq-xrx200-avm_fritz3370-rev2-micron-squashfs-eva-kerne l.bin mtd1 ftp> put /path/to/openwrt-lantiq-xrx200-avm_fritz3370-rev2-micron-squashfs-eva-files ystem.bin mtd0
Maybe it would be easier to put that in a script and just run it manually when you reboot the router?
What they do not say is what to set in the fritzbox, I resettet to factory default and set to "exposed host" for not having problems. I took the laptop and did attribute a static ip, I granted it unlimited rights. Still I am not able to get an ftpconnect.
Maybe you should stop your firewall and try it without it? Just in case outbound ftp traffic is somehow being prevented. Typically the next I would do is run tcpdump or wireshark to figure exactly what's going on. I tried without setting internet provider and with setting "over lan"
using to connect the second ethernet port of the router (as the producer said).
I am overlooking something. Just do not know what. Connection "times out" but seems to be established.
You never get the "ftp>" prompt? -- Per Jessen, Zürich (7.6°C) http://www.hostsuisse.com/ - virtual servers, made in Switzerland. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
02.12.2018 15:07, stakanov пишет:
In data domenica 2 dicembre 2018 12:09:47 CET, Per Jessen ha scritto:
Per Jessen wrote:
stakanov wrote:
In data domenica 2 dicembre 2018 10:29:19 CET, Per Jessen ha scritto:
stakanov wrote:
Hi, I wish to ftp "within the first seconds of boot" of a fritzbox router in order to check for the hw revision. Idea is, that, since EOL, a flash with openwrt is indicated and could revive the box. I am on leap15, which ftp program would allow this in the most appropriate and easy way? I guess it would be good to switch of the firewall or to use "trusted" zone for the eth when I do it. Did anybody do this in the past and could give some hint?
Assuming I have understood what it is you want, it seems to me 'ftp' is the simple answer. It is easy to script.
well, it has to be a program that sends a continuous ftp request and logs in as soon as ftp becomes available.
I think maybe netcat or telnet could help with that - a loop looking to connect to port 22, once available it skips to ftp. The question
s/22/21/ So port is actually 21. The info is only available shortly after boot: From their website: Within the first seconds after power on a ftp connection needs to be established to the FRITZ!Box at 192.168.178.1 and the the following ftp commands need to be run:
You may need to use additional LAN switch; otherwise it takes too long for Linux to configure interface after link up (which is what happens when you connect Linux directly).
ftp> quote USER adam2 ftp> quote PASS adam2 ftp> binary ftp> debug ftp> passive ftp> quote SETENV linux_fs_start 0 ftp> quote MEDIA FLSH ftp> put /path/to/openwrt-lantiq-xrx200-avm_fritz3370-rev2-micron-squashfs-eva-kerne l.bin mtd1 ftp> put /path/to/openwrt-lantiq-xrx200-avm_fritz3370-rev2-micron-squashfs-eva-files ystem.bin mtd0
What they do not say is what to set in the fritzbox, I resettet to factory default and set to "exposed host" for not having problems. I took the laptop and did attribute a static ip, I granted it unlimited rights. Still I am not able to get an ftpconnect. I tried without setting internet provider and with setting "over lan" using to connect the second ethernet port of the router (as the producer said).
I am overlooking something. Just do not know what. Connection "times out" but seems to be established.
_________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postfächer sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
You may need to use additional LAN switch; otherwise it takes too long for Linux to configure interface after link up (which is what happens when you connect Linux directly). Ok, that rings a bell. In the howto they spoke about using a second fritz box, I would suppose to do exactly that. I have a spare microtic router. I will try to set it up to the same subnet, so
In data domenica 2 dicembre 2018 13:44:43 CET, Andrei Borzenkov ha scritto: provided I have the fritzbox in lan mode, would I then communicate to the port 2 or to the port 1? AVM says the port 1 in LAN mode is to be connected to the router giving access to the internet, so with "exposed host" it should be easy to talk to it via the microtic using the laptop. still,....that is quite a PITA to flash that router....and half of the sites giving howto are either down or not yet setup after the change from LEDE to openWRT (e.g. the only general flash howto is in Japanese). _________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postf�cher sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 02/12/2018 14.06, stakanov wrote:
You may need to use additional LAN switch; otherwise it takes too long for Linux to configure interface after link up (which is what happens when you connect Linux directly). Ok, that rings a bell. In the howto they spoke about using a second fritz box, I would suppose to do exactly that. I have a spare microtic router. I will try to set it up to the same subnet, so
In data domenica 2 dicembre 2018 13:44:43 CET, Andrei Borzenkov ha scritto: provided I have the fritzbox in lan mode, would I then communicate to the port 2 or to the port 1?
Usually it does not matter. The router (the spare one) typically will have a 4 port switch on the "output" side. Just connect the computer to one, and your problem router to another; if the router has an input port, leave it empty. The configuration of the spare router does not matter, because you are using it as switch. Set the computer to fixed IP, not auto. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
On 02/12/2018 14.06, stakanov wrote:
In data domenica 2 dicembre 2018 13:44:43 CET, Andrei Borzenkov ha scritto:
You may need to use additional LAN switch; otherwise it takes too long for Linux to configure interface after link up (which is what happens when you connect Linux directly).
Ok, that rings a bell. In the howto they spoke about using a second fritz box, I would suppose to do exactly that. I have a spare microtic router. I will try to set it up to the same subnet, so provided I have the fritzbox in lan mode, would I then communicate to the port 2 or to the port 1?
Usually it does not matter.
The router (the spare one) typically will have a 4 port switch on the "output" side. Just connect the computer to one, and your problem router to another; if the router has an input port, leave it empty. The configuration of the spare router does not matter, because you are using it as switch. Set the computer to fixed IP, not auto. so, to understand. router fb(fritzbox) - router MT - laptop fix ip - standard ip - fix ip
In data domenica 2 dicembre 2018 14:39:17 CET, Carlos E. R. ha scritto: that should do. Why is ist such a PITA to get OSS firmware running on a machine???? E.g. to have coreboot on my X201, I would have to manipulate the NAND with a special reader opening the housing and if not enough, there is a difference in how I would deactivate the proprietary and filzy IME (total or partial...) a PITA wherever you go. Intel should go really OSS with their IME. I cannot understand why this is still no the case. For AMD the same. Wondering who is waking up first. Sorry for the rant. But I hate to have waste while the hardware like the AVM 3370 is perfectly fitting as home router for a lot of issues. _________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postf�cher sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 02/12/2018 19.26, stakanov wrote:
In data domenica 2 dicembre 2018 14:39:17 CET, Carlos E. R. ha scritto:
On 02/12/2018 14.06, stakanov wrote:
In data domenica 2 dicembre 2018 13:44:43 CET, Andrei Borzenkov ha scritto:
You may need to use additional LAN switch; otherwise it takes too long for Linux to configure interface after link up (which is what happens when you connect Linux directly).
Ok, that rings a bell. In the howto they spoke about using a second fritz box, I would suppose to do exactly that. I have a spare microtic router. I will try to set it up to the same subnet, so provided I have the fritzbox in lan mode, would I then communicate to the port 2 or to the port 1?
Usually it does not matter.
The router (the spare one) typically will have a 4 port switch on the "output" side. Just connect the computer to one, and your problem router to another; if the router has an input port, leave it empty. The configuration of the spare router does not matter, because you are using it as switch. Set the computer to fixed IP, not auto. so, to understand. router fb(fritzbox) - router MT - laptop fix ip - standard ip - fix ip
| Bad Router Spare router | | | | | +-------------+ +----------------laptop Some IP some other IP (non dhcp)
that should do. Why is ist such a PITA to get OSS firmware running on a machine???? E.g. to have coreboot on my X201, I would have to manipulate the NAND with a special reader opening the housing and if not enough, there is a difference in how I would deactivate the proprietary and filzy IME (total or partial...) a PITA wherever you go. Intel should go really OSS with their IME. I cannot understand why this is still no the case. For AMD the same. Wondering who is waking up first. Sorry for the rant. But I hate to have waste while the hardware like the AVM 3370 is perfectly fitting as home router for a lot of issues.
Oh, I agree heartily. Writing openrouter software to a router is sometimes a pain in the nameless because manufacturers do not facilitate repurposing their machines. Just buy another machine. I did it once. Flashing it was easy, but using it was a pain, because the management web page had so little memory that it was terribly slow, like minutes to respond to each action, and some actions would take half an hour or crash it. I tried another time, and the procedure this time was described as difficult. Soldering pins to create a management serial port. Uff. I abandoned. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" at Telcontar)
On Sun, 02 Dec 2018 13:07:49 +0100 stakanov <stakanov@eclipso.eu> wrote:
So port is actually 21. The info is only available shortly after boot: From their website:
Within the first seconds after power on a ftp connection needs to be established to the FRITZ!Box at 192.168.178.1 and the the following ftp commands need to be run: ftp> quote USER adam2 ftp> quote PASS adam2
Sorry, diving in with no real understanding of what is being discussed :( But is what you wrote suggesting that your Fritz!box has a fixed default username and password to reflash the box? That sounds terribly last century, if so. My uninformed opinion suggests that they have a better reputation than that. In which case, are you sure that those are the correct values to use for YOUR Fritz!box? Maybe there's printing on the box, or on a piece of paper that came with it? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
In data domenica 2 dicembre 2018 20:23:00 CET, Dave Howorth ha scritto:
On Sun, 02 Dec 2018 13:07:49 +0100
stakanov <stakanov@eclipso.eu> wrote:
So port is actually 21. The info is only available shortly after
boot: From their website:
Within the first seconds after power on a ftp connection needs to
be
established to the FRITZ!Box at 192.168.178.1 and the the following
ftp commands need to be run:
ftp> quote USER adam2 ftp> quote PASS adam2
Sorry, diving in with no real understanding of what is being discussed :(
But is what you wrote suggesting that your Fritz!box has a fixed default username and password to reflash the box? That sounds terribly last century, if so. My uninformed opinion suggests that they have a better reputation than that. In which case, are you sure that those are the correct values to use for YOUR Fritz!box? Maybe there's printing on the box, or on a piece of paper that came with it? you define users. These users have defined rights. You need to give clearance for these users for actions to be authorized in your home network. In order to flash the easiest is to set it back to factory defaults (what I did). The issue is that the documentation howto is on a server which is unfortunately down. AVM has a good reputation. The do support their modems for more than 10 years. But that does not mean that it is easy to install a custom firmware. In my case it is the lack of experience with the procedure the culprit not AVM. Bear in mind that OSS firmware is NOT in the interest of the vendor because your device lives longer and sometimes...does more.
_________________________________________________________________ ________________________________________________________ Ihre E-Mail-Postf�cher sicher & zentral an einem Ort. Jetzt wechseln und alte E-Mail-Adresse mitnehmen! https://www.eclipso.de -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (5)
-
Andrei Borzenkov
-
Carlos E. R.
-
Dave Howorth
-
Per Jessen
-
stakanov