Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Page 1 of 2 1 2 >
Topic Options
#278474 - 29/03/2006 16:09 New Home Server. Help Needed.......
Cris
pooh-bah

Registered: 06/02/2002
Posts: 1904
Loc: Leeds, UK
After many many many years I have decided to swap my ISP from BT to Zen in order to get myself a range of fixed IP's. The end goal is access from the web of several devices I have on the network (cctv, tivo, future home automation etc...).

This all works to a point at the moment, I host the different services on different ports and use the features in my DSL router to point things in the right direction. What I would like is one single secure web gateway/interface to all these systems with a secure login etc...

I would like to keep general internet access seperate from this system and behind a firewall of some kind. I have a spare PC and the current cctv server ready for use, but I am not finding much that can do what I want and I am way out of my depth, so I thought someone here may like to point me in the right direction

Cheers

Cris.

Top
#278475 - 29/03/2006 16:18 Re: New Home Server. Help Needed....... [Re: Cris]
tman
carpal tunnel

Registered: 24/12/2001
Posts: 5528
You can run Apache on your gateway and get it to proxy stuff into your internal network. Turn on passwords and it should be reasonably secure as well.

If you don't want it on the gateway then port forward from the firewall to your webserver box instead.

Top
#278476 - 29/03/2006 16:24 Re: New Home Server. Help Needed....... [Re: Cris]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14478
Loc: Canada
If you really want to use a range of external IP addresses (rather than DNAT on a firewall), then the thing you need in front of them all is a "bridging firewall" (or "transparent" firewall).

Linux can do this, of course.

Cheers

Top
#278477 - 29/03/2006 16:28 Re: New Home Server. Help Needed....... [Re: tman]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Quote:
You can run Apache on your gateway and get it to proxy stuff into your internal network.

In addition to which, it not only doesn't need separate IP addresses, it won't really work with separate IP addresses.
_________________________
Bitt Faulk

Top
#278478 - 29/03/2006 16:45 Re: New Home Server. Help Needed....... [Re: wfaulk]
Cris
pooh-bah

Registered: 06/02/2002
Posts: 1904
Loc: Leeds, UK
So what would be the best option to use my slimserver from both side of the network?

Are there any good "dummy" type websites for this stuff?

Cheers

Cris.

Top
#278479 - 29/03/2006 17:15 Re: New Home Server. Help Needed....... [Re: Cris]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
I'd set it up with Apache's "reverse proxy" feature. Just google on that and see what comes up. I assume that it'll work on a non-Unix Apache, but I don't know for sure.
_________________________
Bitt Faulk

Top
#278480 - 10/04/2006 20:58 Re: New Home Server. Help Needed....... [Re: wfaulk]
Cris
pooh-bah

Registered: 06/02/2002
Posts: 1904
Loc: Leeds, UK
So, after looking into the whole thing I have ended up running ClarkConnect. It's my first outing onto a Linux based system, and I seem to be getting on with it fine. I haven't got to grips with the whole reverse proxy thing yet, but I get the idea.

It's all running off a 1GHz C3 Mini-ITX board in one of these! I didn't pay that price for it, they are really nice people, I went to see them and they did me a really good deal. I also splashed out and got 2 new 250Gb WD RE from Scan. I am so happy with the format, I think I am going to shift the CCTV server into one too

Thanks for the pointers, I am learning lots of new things here, I even found myself picking up books on PHP and MySQL at the bookshop over the weekend

Cheers

Cris.

Top
#278481 - 11/04/2006 04:40 Re: New Home Server. Help Needed....... [Re: Cris]
StigOE
addict

Registered: 27/10/2002
Posts: 568
I have been running ClarkConnect for several years and I'm also very happy with it. I'm also running my mailserver and webserver off it.

Stig

Top
#278482 - 13/04/2006 17:00 Re: New Home Server. Help Needed....... [Re: Cris]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
Quote:

It's all running off a 1GHz C3 Mini-ITX board in one of these! I didn't pay that price for it, they are really nice people, I went to see them and they did me a really good deal. I also splashed out and got 2 new 250Gb WD RE from Scan. I am so happy with the format, I think I am going to shift the CCTV server into one too



Thanks to your post I finally spurred myself into action and bought the parts for my silent server (to replace the two big noisy and hot servers that currently live in my garage).

I was going to buy my T2e chassis from mini-itx.com, which would have cost me £150. After your post I bought it direct from Tranquil for £65 (via a "best offer" bid) ! Thanks.

I also got a PSU and EPIA SP13000 from them at the same time, with only £10 postage for the lot.

I've just put it together, along with 2 250GB Seagate NL35 drives (or at least the drives will get plugged in when I pick up a couple of SATA cables). Getting the old heat sinks off of the CPU and Northbridge was much easier than I was expecting.

Once I've soak tested it I'll have the joy of getting Debian + SATA + software RAID1 (on the boot drive) up and running.

I'll probably get another 250GB drive and fanless external USB2 box to act as the spare disk in my array.

P.S. does any one know if the memory limit for the EPIA SP13000 really is 1GB. It has a single slot and everywhere I read that it can take a maximum of a 1GB stick of RAM, but I have come across cases before where motherboards could in fact support higher density RAM, even when all the docs said they couldn't. A case in point is my old NEC laptop, all the docs say it can only handle 128MB RAM (limiting it to 256MB) whereas in reality it was happy using 256MB RAM sticks (taking it to 512MB).

Unfortnately (or maybe fortunately) I don't have a 2GB stick of RAM to try it with...
_________________________
Remind me to change my signature to something more interesting someday

Top
#278483 - 13/04/2006 17:53 Re: New Home Server. Help Needed....... [Re: andy]
Cris
pooh-bah

Registered: 06/02/2002
Posts: 1904
Loc: Leeds, UK
Glad to be of help

They are great cases for the price, I'm in Manchester quite a bit these days, so I went down to their unit to pick them up. Very nice people, willing to offer loads of advice, and gave me a demo of just about every single product they offer.

Check out the cheesey photo of my under the stairs rack...



The 4U server above the new mini-atx, is very loud, comes out at about 55dB on my sound meter, so I think the swap out will happen sonner rather than later.

Cheers

Cris.


Attachments
279829-HomeRack.jpg (158 downloads)


Top
#278484 - 13/04/2006 19:59 Re: New Home Server. Help Needed....... [Re: Cris]
andym
carpal tunnel

Registered: 17/01/2002
Posts: 3995
Loc: Manchester UK
Quote:
Check out the cheesey photo of my under the stairs rack...


Is that a BT patchbay I see there?
_________________________
Cheers,

Andy M

Top
#278485 - 13/04/2006 20:35 Re: New Home Server. Help Needed....... [Re: Cris]
matthew_k
pooh-bah

Registered: 12/02/2002
Posts: 2298
Loc: Berkeley, California
That's a nice little home rack you've got there, is that off the shelf or did you make it yourself?

Matthew

Top
#278486 - 14/04/2006 00:48 Re: New Home Server. Help Needed....... [Re: Cris]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14478
Loc: Canada
That's a great looking rack, Cris(sie)

Definitely custom. MDF?

Those massive power plugs really add to the effect -- much more impressive than the skinny wee ones we have over this side!

Cheers

Top
#278487 - 14/04/2006 07:02 Re: New Home Server. Help Needed....... [Re: andym]
Cris
pooh-bah

Registered: 06/02/2002
Posts: 1904
Loc: Leeds, UK
Quote:
Is that a BT patchbay I see there?


Umm, yea, I found that in a skip

Quote:
Definitely custom. MDF?


It's sort of custom, I got it from a company called Wizzard, they make rackmounts to go in music and TV studios, but they seem to have gone bust as their website is down? It's a beech veneer finish, so a little over the top for my needs, I think I would make the next one myself out of MDF.

One problem I do have is cooling the room, it doesn't get very hot, but hot enough, it's a sealed room and can get upto 32 if I leave the door shut for a week or two, does anyone have any ideas about cooling a sealed room like this without noisy fans etc... Unfortunatly as it's under the stairs and in the middle of the house there is no access to an outside wall. I was thinking of some kind of temp sensor that could control a small fan, and report to a webpage of course! Something a little like the WeatherDuck?

Or, am I going a little over the top for a home setup

Cheers

Cris.

Top
#278488 - 14/04/2006 07:33 Re: New Home Server. Help Needed....... [Re: Cris]
sn00p
addict

Registered: 24/07/2002
Posts: 618
Loc: South London
Yeah, that looks a little over the top.

I'm sure theres more than one of us on here who could knock you something up with a NTC/PTC/dallas one wire sensor + microcontroller (dare I say it PIC/AVR) that would dump the temperature to the serial port.

Actually, I bet there's hundreds of PIC projects on the web that do what you want!

Top
#278489 - 14/04/2006 07:59 Re: New Home Server. Help Needed....... [Re: sn00p]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
When I wanted temperature monitoring I got this kit, complete with pre-programmed PIC for about $25. It is still plugged into my server and working well.

Thanks to my T2e purchase I shouldn't need to worry about monitoring the temperature in my garage for much longer.
_________________________
Remind me to change my signature to something more interesting someday

Top
#278490 - 14/04/2006 08:09 Re: New Home Server. Help Needed....... [Re: Cris]
boxer
pooh-bah

Registered: 16/04/2002
Posts: 2011
Loc: Yorkshire UK
Quote:
cooling a sealed room

What you have there is a useful means of providing background heat for the rest of the house, without using valuable energy resources, I'm sure Tahir would applaud! All you have to do is install a couple of small ducts and a fan, to take it to somewhere useful, with perhaps an arrangement to switch it to outside in warm weather. That is, unless, of course, you can think of a way of running the pipes through your hot water tank.
Maybe I'll get a set up like that for under the stairs, if only I could think what to do with it!
_________________________
Politics and Ideology: Not my bag

Top
#278491 - 14/04/2006 17:08 Re: New Home Server. Help Needed....... [Re: Cris]
wfaulk
carpal tunnel

Registered: 25/12/2000
Posts: 16706
Loc: Raleigh, NC US
Your computer probably has some sort of in-case ambient temperature sensor. It won't be the same as the room's ambient temperature, but I bet it's pretty easy to assume from that.
_________________________
Bitt Faulk

Top
#278492 - 14/04/2006 21:53 Re: New Home Server. Help Needed....... [Re: wfaulk]
Cris
pooh-bah

Registered: 06/02/2002
Posts: 1904
Loc: Leeds, UK
If you look close at the 4U rackmount case it has 2 temperature displays on the front, one is on the HD's and one is the room temp, the sensors are on leads so they can be positioned, so I know there is a heat problem from looking at them.

What I want is a solution that will allow me to monitor the temps on a webpage, and automatically activate some form of cooling system when needed, without me having to go open the door for a bit

It's not major problem at the moment, but if I do move to a server system that has no active cooling at all it could become one I think. For now I guess I will just keep on opening the door every few days and letting the heat escape into the house.

Cheers

Cris.

Top
#278493 - 15/04/2006 04:58 Re: New Home Server. Help Needed....... [Re: Cris]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
Quote:

What I want is a solution that will allow me to monitor the temps on a webpage, and automatically activate some form of cooling system when needed, without me having to go open the door for a bit



In that case you want something like this. With this RS232 board you can read the temperature and control devices via the relays it provides.

The serial commands are all simple, it could all be implemented with some simple Linux shell script and a crontab job.

It isn't available as a kit, only a ready built board, but it is still only £30.
_________________________
Remind me to change my signature to something more interesting someday

Top
#278494 - 15/04/2006 06:16 Re: New Home Server. Help Needed....... [Re: andy]
Cris
pooh-bah

Registered: 06/02/2002
Posts: 1904
Loc: Leeds, UK
Thank looks just the ticket! Is it easy to get the result displayed on a webpage using those methods? That is one area I don't have a clue in.

Cheers

Cris.

Top
#278495 - 15/04/2006 07:34 Re: New Home Server. Help Needed....... [Re: Cris]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
Relatively easy, yes. For example, I display the temperature of my garage here. You can see all the other crap that I monitor here.

To do this I use a couple of shell scripts and mrtg.

N.B. anyone who is any good at Unix shell scripts, sed and the like, cover your eyes now. My Unix commandline knowledge is just barely enough to get by with stuff like this and I know it is nasty...

The first shell script is called "tempread" and looks like this:

Code:
#!/bin/bash

echo `head -n 3 /dev/ttyS0 | tail -n 1`



When you start reading data from the serial port (/dev/ttyS0) you get the following output:

Code:

R V1.0 2001-10-13 11:56:11 C

1 0012.68

1 0012.68

1 0012.75

... (it keeps outputing the temperature until you stop reading



So my shell script uses "head" to grab the first three lines of the output of the serial port. It then uses "tail" to grab the last line of the three.

The "tick" marks, i.e. the ` characters, tell bash to run the command inside and return the text generated.

So the output of tempread looks like:

Code:

1 0012.68



The next shell script is "tempmrtg":

Code:

#!/bin/bash
echo "`/usr/local/bin/tempread |cut -c 5-9` * 100" | bc | sed s/.00$//
echo "0"
echo "0"
echo "0"



This is the script that generates the output for mrtg. Because mrtg is really designed for monitoring router throughput usage it only deals with integers. It expects four values from any scripts it calls. The first is the throughtput in, second throughput out and the last two I forget.

Because I want better than whole number resolution I multiply my temperature by 100. So if the temperature is 12.68 I end up returning 1268 to mrtg.

The first line of "tempmrtg" calls "tempread", extras the temperature digits using cut, combines the temperature with "* 100" and passes that to bc (and command line calculator). It then uses a regex and sed to strip the ".00" off of the end of the resulting value.

The last thing is an entry in the mrtg config file that tell it to call "tempmrtg" to get the values:

Code:

Target[temp]: `/usr/local/bin/tempmrtg`
MaxBytes[temp]: 4000
YTicsFactor[temp]: 0.01
Factor[temp]: 0.01
Options[temp]: gauge, nopercent, noo, transparent
XSize[temp]: 600
YSize[temp]: 150
YLegend[temp]: Temp
ShortLegend[temp]: C
LegendO[temp]:  Nowt:
LegendI[temp]:  Temp C:
Title[temp]: Server room temp
PageTop[temp]: <H1>Server room Temperature
</H1>
<TABLE>
<TR><TD>System:</TD><TD>Server room temp</TD></TR>
</TABLE>



Amongst other things this tell mrtg that:
- it should run "tempmrtg" to get the values for this graph
- that it should divide all the values by 100
- that the temperature will never be more than 40 degrees
- that there is only one value to graph ("noo" tells it that)

Now that I have written all that down it seems a little more complex than I remembered

There are tools that I probably better than mrtg for this stuff now. I use mrtg because that is what I know. The most likely canditate would be rrdtool.


Edited by andy (15/04/2006 07:38)

Top
#278496 - 15/04/2006 07:39 Re: New Home Server. Help Needed....... [Re: andy]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
The bbs is double spacing all my code blocks and not using a sensible font, make it stop...
_________________________
Remind me to change my signature to something more interesting someday

Top
#278497 - 15/04/2006 08:11 Re: New Home Server. Help Needed....... [Re: andy]
sn00p
addict

Registered: 24/07/2002
Posts: 618
Loc: South London
I did the same, best offer of £50 accepted!

Top
#278498 - 15/04/2006 08:28 Re: New Home Server. Help Needed....... [Re: Cris]
sein
old hand

Registered: 07/01/2005
Posts: 893
Loc: Sector ZZ9pZa
I am using Cacti to graph useful information about my server at home.

Fan speed control is actually done in hardware by my Motherboard (an Abit something with a uGuru chip). Temperature monitoring should in theory be a piece of cake in Linux with an lm_sensors compatible motherboard.
_________________________
Hussein

Top
#278499 - 15/04/2006 10:07 Re: New Home Server. Help Needed....... [Re: andy]
julf
veteran

Registered: 01/10/2001
Posts: 1307
Loc: Amsterdam, The Netherlands
Quote:
N.B. anyone who is any good at Unix shell scripts, sed and the like, cover your eyes now.


It was pretty hard to read with my eyes covered , but...

How about replacing the two first scripts with this:

Code:

sed -n -e '3s/^....\(..\)\.\(..\)/\1\2\n0\n0\n0/p'



Given your input data, it produces:
Code:

1268
0
0
0


Top
#278500 - 15/04/2006 10:11 Re: New Home Server. Help Needed....... [Re: sein]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
For those who don't know, Cacti is a front end to the RRDTOOL I mentioned earlier. RRDTOOL was developed by the same guys who did MRTG, when the decided that MRTG's design was too limited for general graphing.

I'll probably give Cacti a go when I get my new server up and running fully. I'll still need my shell scripts however to gather data from things like my temperature board.
_________________________
Remind me to change my signature to something more interesting someday

Top
#278501 - 15/04/2006 10:19 Re: New Home Server. Help Needed....... [Re: julf]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
Thanks Julf !

The problem is that I use sed about once a year, so I never actually completely grasp how to do stuff like that. It can be so frustrating knowing there is a better way to do things but not being able to work out how to do it...

While we are talking about sed, what would be the "right" way to extract both the "DS Margin" and "DS Line Attenuation" values from this input:

Code:

DS Line Attenuation: 40 DS Margin: 8



So far I have:

Code:

cut -d: -f3 | sed -e "s/ *//"



Which gets me the margin value, but I am stuggling to separate out the attenuation value.
_________________________
Remind me to change my signature to something more interesting someday

Top
#278502 - 15/04/2006 10:27 Re: New Home Server. Help Needed....... [Re: julf]
andy
carpal tunnel

Registered: 10/06/1999
Posts: 5914
Loc: Wivenhoe, Essex, UK
Hmmm, the \n doesn't give me a newline, it just outputs "n". Perhaps it is because I have a very old copy of sed (this box is still on RedHat 7.1).
_________________________
Remind me to change my signature to something more interesting someday

Top
#278503 - 15/04/2006 10:27 Re: New Home Server. Help Needed....... [Re: andy]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14478
Loc: Canada
Quote:
DS Line Attenuation: 40 DS Margin: 8


awk '{print $4 " " $7}'

Top
Page 1 of 2 1 2 >