Using Raspberry Pi as a NAS

I have a raspberry pi running my home PBX, I had a friend ask me what is a good nas so I said hey try a pi… There was some questions about if would preform well as the Ethernet and USB are shared… from what my speed tests show it’s not an issue.

 

Media Transfer over samba to a USB HDD

 

If you try this let me know what you get for speeds and transfer rates.

 

also after this test I set the maximum speed for Samba to 85mbit/s so my voip phones have more then enough bandwidth for phone calls.

Stealth Encoder Build

Right now I’m building a Encoder to Encoder a live stream to JTV/LiveStream/Ustream in real time up to 1080p using FFMPEG

Cause we wanted the maximum CPU Cycles for the Encoder to do it’s work we are building this on Debian as “Headless” and I’m building a Web GUI for monitoring and controlling the encoder remotely

 

Here is what is looks like:

Encoder Control panel

Encoder Control panel

 

I will also in the upcoming week be rebuilding this live on TheGeekGroup’s Justin TV Channel and you can ask me anything you want to know about encoding…

PGP Key

I just finished setting up my PGP Key:

—–BEGIN PGP PUBLIC KEY BLOCK—–
Version: PGP Universal 2.9.1 (Build 347)
mQENBFCRVvgBCADFtL6vrnWMzM3ISvYFvvqX9DvzAJEot18BCvE/tNwacOghDYvP
DrwGGolTnmtuE8Rnjtw2IoaxUjhzqfcyLm+U0tyPem4ONOkqvWuQwEmRrmWDh7O5
GEopWjU5cQYZlZ/T3TbtLKdNIcmQEGfiCEc3AI1GRSvz6TaQpSq5vuyvB0wU9Wmr
Khj/Bgc6B9D8EoFnQcCHclB8Ci0HUsFGrd+CxIvhIOTmsOVVlV0Gmz89Tzt25Z3i
iLt0fmxolVaSb/RFppOMqnM0Yr5FlMt4dzVQJ33DC2JwneFCiJhnLalzs3h3zBWv
M2Iw3zZ/+IGx9ifRikAo4AIAfDWlLZ6Mu6VTABEBAAG0L1JpY2hhcmQgQ29ybndl
bGwgKFJDUCkgPHJpY2hhcmRAdGVjaHRva25vdy5uZXQ+iQE4BBMBAgAiBQJQkVb4
AhsvBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRCl8oLkpLXJ9vtWCACtxytH
ZCM4Qp9k0Qn1fhYreQSAeE06LfX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WjUg8irFwJi5cAEQEA
AYkCPgQYAQIACQUCUJFW+AIbLgEpCRCl8oLkpLXJ9sBdIAQZAQIABgUCUJFW+AAK
CRDrZoXKBCUk5HDMB/sGutX7wGPF9GanPbaV7ol3hCFDqnPo94cAjlMaAOmcbUD7
NrCHUzgWRf3ipN9ITydlJanhRYX3B6lJGz/NYyslePpsZIno/EWrB7KlOEfA9JvB
Zzr0bwEmrQRpThaSYS9xUUZPRNEJJrnEpv2CSacEax+YkN0dXCi6vDM89MOcS7e2
Uecj0Iq2eIf3BfjF9t17CHkGOfUlenC0umCCBw3BTbtv7WMmbps0STtuj+msbmRb
FCF5YlKpdxrt/9QUuOGH/C+szhX3XQ9BRnfPMXv+oeBszHJPg21pF8SDWhzN1wFm
b8ovzF5oQMsjMr+v1DCStCFh38R1UFawRoDHCBLqkpgIAKRtYitpoVqhCWf8yQ3S
jUUVP4XDRhLiO0RdyNg6VGcFCv8eh2yyPQiiRjPhbj3SALni9kgiFK8oV0pw/Siw
WCT6ri715s26xl7Lu+2pK16om8vvQBU4l6KqogU7xSvAkB0I/I7dndHqu9jI2yWb
Qtv8mtfZuGdFvQdPSUX/dIwpIdPw0OhAwqkSf83RnlRQuU2yRiTLk9AS1WvQPu1D
UZ49xZGkLphol9ufqvPFh+9gNGkE7cF+6IKqaeZTbQTE0RFASTHXECvncoCEKgF0
55af4mIWr3U8Wwq2N7cJlEntB+ijrIaM+4XLw8o2IHUvkoJjsXo9ovWtHuaxBteT
U1I=
=nMDa
—–END PGP PUBLIC KEY BLOCK—–

 

Also can be downloaded at: http://keyserver.pgp.com/vkd/DownloadKey.event?keyid=0xA5F282E4A4B5C9F6

Posted in About Me Security by RCP. No Comments

Bedroom move around

Sorry for not posting very much I been moving around my bedroom cleaning and getting ready to make this room more of an office…  As well as painting and getting a new bed… as right now I really don’t have one since my air bed failed.  So.. After I get my room done up I will be around more and get to post more blog posts…

Posted in About Me by RCP. No Comments

Git based Server Backups

One of the thing I have to do as a System Administrator is run Backups. There are many ways to do Backups the only issue I have is it has to be easy and work. There are many commercial Backup systems from EMC2 to Full QNAP, and even Home based FreeNAS Solutions. I find that a Linux server with a USB Hard drive and git works the best… and here to you can set one up too!

Note all my how-to’s are done with debian so… here we go.

First as with all debian OS’s UPDATE IT!

apt-get update
apt-get upgrade

Next install git and rsync:

apt-get install git rsync

Alright.. Now lets setup a folder to use for the storage of the Backups.

mkdir /backups/

Now edit /backup.run and add the following lines:

#!/bin/bash
 
cd /backups/
 
# Backup Linux Server 1
rsync -avz –progress –delete root@server1.com:/ /backups/server1/
 
### Uncomment the next line and Just keep adding servers!
## Backup Linux Server 2
#rsync -avz –progress –delete root@server2.com:/ /backups/server2/
 
if [ ! -d “.git” ]; then
git init .
fi
 
git add -A
git commit -m “`date –rfc-3339=seconds`”
git gc

Now chmod it:

chmod 755 /backups.run

and now we will need to make a SSH Key for the server.

Run ssh-keygen on your machine, and just hit enter when asked for a password. Next, add the contents of the public key file ( ~/.ssh/id_rsa.pub ) into ~/.ssh/authorized_keys on the server you are going to be backing up (the file should be a chmod of 600).

 

Now you may run the /backup.run with

/backup.run

 

Now just set a cronjob to backup automatically.

 

There you go a full backup system.  Watch out for the next blog post where we will make a web frontend for git to view the backups.

Common proxy headers to look out for.

Here is a list of all the common proxy headers I can find… They are useful if you need to log the IP behind a porxy.

 

  • CLIENT_IP
  • FORWARDED
  • FORWARDED_FOR
  • FORWARDED_FOR_IP
  • HTTP_CLIENT_IP
  • HTTP_FORWARDED
  • HTTP_FORWARDED_FOR
  • HTTP_FORWARDED_FOR_IP
  • HTTP_PC_REMOTE_ADDR
  • HTTP_PROXY_CONNECTION
  • HTTP_VIA
  • HTTP_X_FORWARDED
  • HTTP_X_FORWARDED_FOR
  • HTTP_X_FORWARDED_FOR_IP
  • HTTP_X_IMFORWARDS
  • HTTP_XROXY_CONNECTION
  • VIA
  • X_FORWARDED
  • X_FORWARDED_FOR

Of course if you know of any, That missed please let me know..

Posted in Security Server by RCP. No Comments