* [gentoo-user] minimal web server
@ 2012-05-05 2:39 James
2012-05-05 4:32 ` Stroller
` (4 more replies)
0 siblings, 5 replies; 13+ messages in thread
From: James @ 2012-05-05 2:39 UTC (permalink / raw
To: gentoo-user
Hello,
Backing up routers, I have an option I can
issue from the a router:
#copy running-config [http | https] <url>
so if my laptop is running some minimal web
server (suggestions are most welcome)
and I have local IP connectivity (say
both on a 10.10.10.x network,
The I could just issue this command?
copy running-config http://10.10.10.<laptop web server IP>
It should work and it's simple. What would be
some recommendations as to which minimal web server
I could run on a laptop (simple and small) to
just backup various router configs to?
James
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] minimal web server
2012-05-05 2:39 [gentoo-user] minimal web server James
@ 2012-05-05 4:32 ` Stroller
2012-05-05 11:22 ` Mick
2012-05-08 0:09 ` Walter Dnes
2012-05-05 11:04 ` Alan McKinnon
` (3 subsequent siblings)
4 siblings, 2 replies; 13+ messages in thread
From: Stroller @ 2012-05-05 4:32 UTC (permalink / raw
To: gentoo-user
On 5 May 2012, at 03:39, James wrote:
> …
> #copy running-config [http | https] <url>
>
> …
> The I could just issue this command?
The question mark terminating this statement seems dubious.
This appears to be a feature of Cisco routers.
http://stack.nil.com/C1256F0A00429755/html/webupload/
> copy running-config http://10.10.10.<laptop web server IP>
>
> It should work and it's simple. What would be
> some recommendations as to which minimal web server
> I could run on a laptop (simple and small) to
> just backup various router configs to?
www-servers/lighttpd is famously small and on my system all its dependencies are already installed. It has a USE=minimal flag you might also try, for fewer calories.
As a matter of practice I would not leave any webserver running on my laptop, or even installed, for longer than necessary. I would prefer to have a home or office webserver to which I could transfer these files and from which the router can obtain them. Rationally, I have no idea why I imagine one site to be more secure than the other.
Consider this installation-free alternative:
http://www.google.co.uk/searchq=one+line+python+web+server
Stroller.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] minimal web server
2012-05-05 2:39 [gentoo-user] minimal web server James
2012-05-05 4:32 ` Stroller
@ 2012-05-05 11:04 ` Alan McKinnon
2012-05-05 16:29 ` [gentoo-user] " James
2012-05-05 15:18 ` Grant Edwards
` (2 subsequent siblings)
4 siblings, 1 reply; 13+ messages in thread
From: Alan McKinnon @ 2012-05-05 11:04 UTC (permalink / raw
To: gentoo-user
On Sat, 5 May 2012 02:39:27 +0000 (UTC)
James <wireless@tampabay.rr.com> wrote:
> Hello,
>
> Backing up routers, I have an option I can
> issue from the a router:
>
> #copy running-config [http | https] <url>
>
> so if my laptop is running some minimal web
> server (suggestions are most welcome)
>
> and I have local IP connectivity (say
> both on a 10.10.10.x network,
>
> The I could just issue this command?
>
> copy running-config http://10.10.10.<laptop web server IP>
>
> It should work and it's simple. What would be
> some recommendations as to which minimal web server
> I could run on a laptop (simple and small) to
> just backup various router configs to?
How many routers are you backing up and what are your needs?
If you have lots of them and need some kind of record, then rancid is a
most excellent tools. It's also very Unixy so you get bonus points
there.
https://www.shrubbery.net
It's a completely different take on the problem you posed in your mail.
--
Alan McKinnnon
alan.mckinnon@gmail.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] minimal web server
2012-05-05 4:32 ` Stroller
@ 2012-05-05 11:22 ` Mick
2012-05-08 0:09 ` Walter Dnes
1 sibling, 0 replies; 13+ messages in thread
From: Mick @ 2012-05-05 11:22 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: Text/Plain, Size: 1499 bytes --]
On Saturday 05 May 2012 05:32:54 Stroller wrote:
> On 5 May 2012, at 03:39, James wrote:
> > …
> > #copy running-config [http | https] <url>
> >
> > …
> > The I could just issue this command?
>
> The question mark terminating this statement seems dubious.
>
> This appears to be a feature of Cisco routers.
>
> http://stack.nil.com/C1256F0A00429755/html/webupload/
>
> > copy running-config http://10.10.10.<laptop web server IP>
> >
> > It should work and it's simple. What would be
> > some recommendations as to which minimal web server
> > I could run on a laptop (simple and small) to
> > just backup various router configs to?
>
> www-servers/lighttpd is famously small and on my system all its
> dependencies are already installed. It has a USE=minimal flag you might
> also try, for fewer calories.
>
> As a matter of practice I would not leave any webserver running on my
> laptop, or even installed, for longer than necessary. I would prefer to
> have a home or office webserver to which I could transfer these files and
> from which the router can obtain them. Rationally, I have no idea why I
> imagine one site to be more secure than the other.
>
> Consider this installation-free alternative:
> http://www.google.co.uk/searchq=one+line+python+web+server
Other alternatives are boa, thttpd, nginx.
You can also run netcat as 'nc -l -p 80 > backup_20120418.cfg' and then run
the copy command from the router.
--
Regards,
Mick
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Re: minimal web server
2012-05-05 2:39 [gentoo-user] minimal web server James
2012-05-05 4:32 ` Stroller
2012-05-05 11:04 ` Alan McKinnon
@ 2012-05-05 15:18 ` Grant Edwards
2012-05-05 15:30 ` [gentoo-user] " Eliezer Croitoru
2012-05-05 22:00 ` Keith Dart
4 siblings, 0 replies; 13+ messages in thread
From: Grant Edwards @ 2012-05-05 15:18 UTC (permalink / raw
To: gentoo-user
On 2012-05-05, James <wireless@tampabay.rr.com> wrote:
> Hello,
>
> Backing up routers, I have an option I can
> issue from the a router:
>
> #copy running-config [http | https] <url>
>
> so if my laptop is running some minimal web
> server (suggestions are most welcome)
>
> and I have local IP connectivity (say
> both on a 10.10.10.x network,
>
> The I could just issue this command?
>
> copy running-config http://10.10.10.<laptop web server IP>
>
> It should work and it's simple. What would be
> some recommendations as to which minimal web server
> I could run on a laptop (simple and small) to
> just backup various router configs to?
I don't really understand what you're talking about with the copy
command, but the busybox httpd server is very simple and easy to run.
Lightpd is also smallish.
--
Grant
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] minimal web server
2012-05-05 2:39 [gentoo-user] minimal web server James
` (2 preceding siblings ...)
2012-05-05 15:18 ` Grant Edwards
@ 2012-05-05 15:30 ` Eliezer Croitoru
2012-05-05 22:00 ` Keith Dart
4 siblings, 0 replies; 13+ messages in thread
From: Eliezer Croitoru @ 2012-05-05 15:30 UTC (permalink / raw
To: gentoo-user
On 05/05/2012 05:39, James wrote:
> Hello,
>
> Backing up routers, I have an option I can
> issue from the a router:
>
> #copy running-config [http | https]<url>
>
> so if my laptop is running some minimal web
> server (suggestions are most welcome)
>
> and I have local IP connectivity (say
> both on a 10.10.10.x network,
>
> The I could just issue this command?
>
> copy running-config http://10.10.10.<laptop web server IP>
>
> It should work and it's simple. What would be
> some recommendations as to which minimal web server
> I could run on a laptop (simple and small) to
> just backup various router configs to?
>
>
>
> James
>
how about small ftp server instead http\https server?
Eliezer
--
Eliezer Croitoru
https://www1.ngtech.co.il
IT consulting for Nonprofit organizations
eliezer <at> ngtech.co.il
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Re: minimal web server
2012-05-05 11:04 ` Alan McKinnon
@ 2012-05-05 16:29 ` James
2012-05-05 23:09 ` Alan McKinnon
0 siblings, 1 reply; 13+ messages in thread
From: James @ 2012-05-05 16:29 UTC (permalink / raw
To: gentoo-user
Alan McKinnon <alan.mckinnon <at> gmail.com> writes:
> > #copy running-config [http | https] <url>
> How many routers are you backing up and what are your needs?
It varies. I seem to 'inherit' networks that are not populated
by humans (mostly machines & controls). I like to first copy
the running configurations to my laptop as often the routers are old and
nobody seems to know much about them. (yea as an old linux_hag
I get work on stuff that most other will not touch).....
As a PE in Controls, I seem to get lucky and am able
to patch, enhance or replace equipment, with minimal
disturbances to the myriad of protocols and legacy
heuristics that inhabit these plants. It's a situation
where if you break it, you own the problem. I try very
hard to keep Microsoft based technologies out of the plants.
Microsoft(anything) is mostly a disaster in the Process
Controls space. I often prove this to a customer, by dropping
in a sniffer here and there and show them the myriad of
shit_traffic that Microsoft(anything) generates just to move
a few bits around. Besides, if you don't believe me,
just ask the IRANIANS how wonderful MS is (think stuxnet virus).
(enough background?)
I use a laptop, as often the sites do not have any remote
access or it is blocked. I grab a config and then figure
out a fix, only to return later, sometimes with drop in
replacement hardware. Too often, I'm content to just hack
at the old existing (shit) hardware. Industrial folks are not
so robust on their nets that control machines and such.Often,
Poor practices and little of a structured management system exist.
Still, I get to avoid humans, so I trudge along, meeking out a living....
> https://www.shrubbery.net/rancid
Rancid looks interesting enough to explore. Do you have an unofficial
ebuild somewhere, or do you just hack the install on gentoo?
James
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] minimal web server
2012-05-05 2:39 [gentoo-user] minimal web server James
` (3 preceding siblings ...)
2012-05-05 15:30 ` [gentoo-user] " Eliezer Croitoru
@ 2012-05-05 22:00 ` Keith Dart
2012-05-07 11:57 ` [gentoo-user] " James
2012-05-08 9:56 ` [gentoo-user] " napalm
4 siblings, 2 replies; 13+ messages in thread
From: Keith Dart @ 2012-05-05 22:00 UTC (permalink / raw
To: gentoo-user; +Cc: wireless
Re , James said:
> #copy running-config [http | https] <url>
Routers can usually also write to a tftp or ftp server. Those are
actually simpler to set up.
To use HTTP you would also have to set up a POST handler.
-- Keith
--
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Keith Dart <keith@dartworks.biz>
public key: ID: 19017044
<http://www.dartworks.biz/>
=====================================================================
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] Re: minimal web server
2012-05-05 16:29 ` [gentoo-user] " James
@ 2012-05-05 23:09 ` Alan McKinnon
2012-05-07 12:03 ` James
0 siblings, 1 reply; 13+ messages in thread
From: Alan McKinnon @ 2012-05-05 23:09 UTC (permalink / raw
To: gentoo-user; +Cc: wireless
On Sat, 5 May 2012 16:29:47 +0000 (UTC)
James <wireless@tampabay.rr.com> wrote:
> Alan McKinnon <alan.mckinnon <at> gmail.com> writes:
>
>
> > > #copy running-config [http | https] <url>
>
> > How many routers are you backing up and what are your needs?
>
> It varies. I seem to 'inherit' networks that are not populated
> by humans (mostly machines & controls). I like to first copy
> the running configurations to my laptop as often the routers are old
> and nobody seems to know much about them. (yea as an old linux_hag
> I get work on stuff that most other will not touch).....
> As a PE in Controls, I seem to get lucky and am able
> to patch, enhance or replace equipment, with minimal
> disturbances to the myriad of protocols and legacy
> heuristics that inhabit these plants. It's a situation
> where if you break it, you own the problem. I try very
> hard to keep Microsoft based technologies out of the plants.
> Microsoft(anything) is mostly a disaster in the Process
> Controls space. I often prove this to a customer, by dropping
> in a sniffer here and there and show them the myriad of
> shit_traffic that Microsoft(anything) generates just to move
> a few bits around. Besides, if you don't believe me,
> just ask the IRANIANS how wonderful MS is (think stuxnet virus).
>
> (enough background?)
>
> I use a laptop, as often the sites do not have any remote
> access or it is blocked. I grab a config and then figure
> out a fix, only to return later, sometimes with drop in
> replacement hardware. Too often, I'm content to just hack
> at the old existing (shit) hardware. Industrial folks are not
> so robust on their nets that control machines and such.Often,
> Poor practices and little of a structured management system exist.
> Still, I get to avoid humans, so I trudge along, meeking out a
> living....
>
>
> > https://www.shrubbery.net/rancid
>
> Rancid looks interesting enough to explore. Do you have an
> unofficial ebuild somewhere, or do you just hack the install on
> gentoo?
Our rancid stuff runs on FreeBSD (I banned Gentoo from all new
production installs 3 years ago...) so we mostly don't bother with
packages. Good old "./configure && make && make install" is what works
for us.
rancid is awesome for what it does, but I doubt it will suit your
needs. Because it logs int a device periodically, it needs direct
access somehow. And considering the age of some of the stuff you
have[1] most of it won't support ssh properly, so you need telnet.
There goes any idea of polling devices for backup purposes and we're
back to grabbing the config off the router on-site. Like several others
said already, I'd go for ftp rather than http for this, it's just
easier.
[1] lemme guess - you deal with actual live networks right? Real ones
that people built. Not the kind of mythical networks described in
Gartner white papers and Cisco training manual where everything is
somehow supposed to all just magically work out the box (but
doesn't...)?
--
Alan McKinnnon
alan.mckinnon@gmail.com
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Re: minimal web server
2012-05-05 22:00 ` Keith Dart
@ 2012-05-07 11:57 ` James
2012-05-08 9:56 ` [gentoo-user] " napalm
1 sibling, 0 replies; 13+ messages in thread
From: James @ 2012-05-07 11:57 UTC (permalink / raw
To: gentoo-user
Keith Dart <keith <at> dartworks.biz> writes:
>
> Re , James said:
> > #copy running-config [http | https] <url>
>
> Routers can usually also write to a tftp or ftp server. Those are
> actually simpler to set up.
>
> To use HTTP you would also have to set up a POST handler.
I've used tftp quite a lot in the past. I was looking
for something more, as tftp often is problematic and slow.
Thx,
James
^ permalink raw reply [flat|nested] 13+ messages in thread
* [gentoo-user] Re: minimal web server
2012-05-05 23:09 ` Alan McKinnon
@ 2012-05-07 12:03 ` James
0 siblings, 0 replies; 13+ messages in thread
From: James @ 2012-05-07 12:03 UTC (permalink / raw
To: gentoo-user
Alan McKinnon <alan.mckinnon <at> gmail.com> writes:
> Our rancid stuff runs on FreeBSD (I banned Gentoo from all new
> production installs 3 years ago...) so we mostly don't bother with
> packages. Good old "./configure && make && make install" is what works
> for us.
OK, although Rancid is not exactly what I was looking for. Still,
I'll give it a look.
> [1] lemme guess - you deal with actual live networks right? Real ones
> that people built. Not the kind of mythical networks described in
> Gartner white papers and Cisco training manual where everything is
> somehow supposed to all just magically work out the box (but
> doesn't...)?
Unfortunately, yes. Not only that, I work often in heterogenous
router environments. Often things that work well between a single
vendor's routers, do not work well with a myriad of different
makes, models, and firmware versions from off-brands......
The bitch of it all, is often I work on routers in non-climate controlled
environments, so they are rated to 40 C and beyond.........
I still cannot find the IOS syntax that compensates for heat and humidity......
I'm going to check out those minimal webservers, just for grins.
thx,
James
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] minimal web server
2012-05-05 4:32 ` Stroller
2012-05-05 11:22 ` Mick
@ 2012-05-08 0:09 ` Walter Dnes
1 sibling, 0 replies; 13+ messages in thread
From: Walter Dnes @ 2012-05-08 0:09 UTC (permalink / raw
To: gentoo-user
On Sat, May 05, 2012 at 05:32:54AM +0100, Stroller wrote
> Consider this installation-free alternative:
> http://www.google.co.uk/searchq=one+line+python+web+server
This. Here's a Gentoo-specific script, which I saved as "~/bin/webd"
that handles Python 2 and 3...
===================================================
#!/bin/bash
cd ${1}
current_python=`eselect python show`
if [ "${current_python:0:7}" == "python2" ]; then
python -m SimpleHTTPServer
elif [ "${current_python:0:7}" == "python3" ]; then
python -m http.server 8000
fi
===================================================
If it's called as simply "webd", it serves up my home directory. If
it's called as "webd /usr/portage/distfiles" it allows access to my
distfiles directory. Note that the user that launches webd has to have
at least read access to the directories to be served.
--
Walter Dnes <waltdnes@waltdnes.org>
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [gentoo-user] minimal web server
2012-05-05 22:00 ` Keith Dart
2012-05-07 11:57 ` [gentoo-user] " James
@ 2012-05-08 9:56 ` napalm
1 sibling, 0 replies; 13+ messages in thread
From: napalm @ 2012-05-08 9:56 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 735 bytes --]
On Sat, May 05, 2012 at 03:00:25PM -0700, Keith Dart wrote:
> Re , James said:
> > #copy running-config [http | https] <url>
>
>
> Routers can usually also write to a tftp or ftp server. Those are
> actually simpler to set up.
>
> To use HTTP you would also have to set up a POST handler.
>
>
> -- Keith
>
>
> --
>
> -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Keith Dart <keith@dartworks.biz>
> public key: ID: 19017044
> <http://www.dartworks.biz/>
> =====================================================================
>
Well a small web-server is going to handle the POST headers for you -
you're not going to have to write everything from scratch.
[-- Attachment #2: Type: application/pgp-signature, Size: 316 bytes --]
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2012-05-08 9:58 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-05 2:39 [gentoo-user] minimal web server James
2012-05-05 4:32 ` Stroller
2012-05-05 11:22 ` Mick
2012-05-08 0:09 ` Walter Dnes
2012-05-05 11:04 ` Alan McKinnon
2012-05-05 16:29 ` [gentoo-user] " James
2012-05-05 23:09 ` Alan McKinnon
2012-05-07 12:03 ` James
2012-05-05 15:18 ` Grant Edwards
2012-05-05 15:30 ` [gentoo-user] " Eliezer Croitoru
2012-05-05 22:00 ` Keith Dart
2012-05-07 11:57 ` [gentoo-user] " James
2012-05-08 9:56 ` [gentoo-user] " napalm
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox