Your external IP address, and Dynamic DNS

So, I've decided to start working on a new (Free) Dynamic DNS service. Not using anyone else's methods or guides, just doing the lot by myself, and seeing how it goes.

You can see the new site at http://ip.g4n.co

This also can be found at ganey.co.uk, but the urls I will offer to start with will be xyz-ip.g4n.co any further suggestions, please feel free to send them to me at freedns@ganey.co.uk

This should be finished by the end of the week, i'll keep here updated. Read More

How to arma2 on centos GLIBC 2.7 error

I was asked to setup GLIBC 2.7 to allow arma2 server to run on centos 6.4.

I have come up with the following steps:

#install dependancies

yum -y install libmpc-devel mpfr-devel

#Download GCC:
#home directory shouldnt get full, i tried using /usr/src first, ended up with rootfs full.

mkdir /home/src
cd /home/src
wget ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.1/gcc-4.7.1.tar.bz2

tar xjf gcc-4.7.1.tar.bz2
cd gcc-5.7.1

#(if you encounter any errors deal with them accordingly by installing missing packages etc)

#open a screen
./make -j5(if you have a cpu with 4 cores)

#ctrl a+d to break out of screen, allows make to run a little faster
#screen -r to resume to check status of make

#resume screen then run
./make install
#ctrl a+d to detach screen again, check status occasionally

echo /usr/local/lib/ > /etc/ld.so.conf.d/libs.conf

#setup new libstdc++
sudo rm /usr/lib/libstdc++.so /usr/lib/libstdc++.so.6
sudo ln -s /usr/lib/libstdc++.so.6.0.17 /usr/lib/libstdc++.so
sudo ln -s /usr/lib/libstdc++.so.6.0.17 /usr/lib/libstdc++.so.6
sudo chmod 755 /usr/lib/libstdc++.so.6.0.17

#create config at #SOMEDIRECTORY#/arma2oa-linux/server.cfg
#check server is ready to start

arma2oaserver check

#start server

arma2oaserver start

#check status

arma2oaserver status

Hope this can help the people out there with a full set of instructions of how to get this working. Read More

Power usage on Raspberry Pi (rpi) using uptimed

using the same data i get from uptimed, i have used normal electricity usage calculations to calculate my power usage on the raspberry pi based upon the specifications of it using 700mA at 5v, with the average cost per unit of electricity to my local rate of 14.39p (GBP) per kWh.

You can now see the data regularly update at the bottom left of this page. Read More


mt.Gox Windows Phone App

Now having a Windows Phone, I looked for a mt.Gox App, and found nothing. So I decided to make one.

I have currently submitted for beta and am doing some testing. If anyone would like to test this app, please contact mtgox.dev@ganey.co.uk and I will select some people for the beta. Full release should (hopefully) be within the week.

Here are some images:

mt.gox app on windows phone
mt.goc app on windows phone concept

I'll update here when I have the App approval and such from Microsoft.
Edit: I have now removed this from store due to api updates and such as of Nov 2013 this is no longer available. Read More


How to prevent the symbolic link hack for cPanel

So, cPanel servers can be hacked with .htaccess files and symbolic links. Joomla and Wordpress are popular code to hack.Here is a common cPanel / Apache hack:

et me show you which method "Hacker..." uses to get source of the config files of your website for example wp-config.php and I will show you how to prevent this.

1) He login to cPanel as a normal user http://ip-address/cpanel then type login and password to Login
2) Then he opens File manager (show hidden files "dotfiles") and then creates new .htaccess file with following source:
#.htaccess file source 
Options Indexes FollowSymLinks
DirectoryIndex doesnt-matter. htm
AddType txt .php
AddHandler txt .php
#End of .htaccess file
3) Then he creates a symbolic link (soft link) with perl scripts or just uses CRON job to create a symbolic link of top level directory "/" typing: "ln -s / topdir"
4) After that, he open browser and typing http://server-ip/~his-home-dir/topdi.../wp-config.php and then just looking source of the page, all data present as a TXT(text) data. That's all. User has been hacked.

Here is a post from StevenC who is a server security / administrator at Rack911.com.

How to install our patch (apache 2.2 only):

wget http://layer1.rack911.com/before_apache_make -O /scripts/before_apache_make 
chmod 700 /scripts/before_apache_make
#Rebuild apache after. 

If you have any issues, let us know, we would be interested in hearing it.
If you want to thank us, your free to do that aswell.

When trying to access a file located in another account via a symlink, you will see this in the error log:

[Sun Nov 06 05:06:23 2011] [error] [client xxxxxx] Symbolic link not allowed or link target not accessible: /home/xxxxx/public_html/1/confirm.txt
Also, find out if your already a victim:

find /home*/*/public_html -type l

How to remove?:

rm -f /scripts/before_apache_make
#Rebuild apache after. 
His original post is here: ...cpanel.net...prevent-creating-symbolic-links..#post996441

The thread is here:...cpanel.net...prevent-creating-symbolic-links..

I hope this can help some people out, this is a WIDE issue, cPanel still takes thier money, and by the looks of it (I've only read lots of threads, so don't hold me to it) aren't doing anything about it because it's to do with Apache.
Apache provide a perfectly good webserver, where stand alone, symlinks wouldn't be a problem. cPanel uses it for a multiuser level, and isn't making the required changed to an Open Source Project to ensure it is secure? Read More

cPanel and PBX / Asterisk

Across the last few days myself and a colleague have been trying to setup cPanel and a PBX on the same server, due to clashing configs and requirements and such, to start with, this seemed difficult.

So, we've restarted and re-installed the server several times. I decide to install cpanel first.

So, we update centos, and grab a coffee. Next we install the base group and such, then install cpanel. Here we have a rather long coffee break depending on your hardware.

Coffee break over.
Time to add those missing things that cpanel sometiems misses out, edit the yum repo to allow the installaion of php, php-pear, httpd and anything that you would require for your PBX. (mysql will already be installed with cpanel.)

You will now be able to install all the requirements for your PBX. Create the PBX user in the database, and copy all the cpanel PHP packages (or symlink them) to a more normal place such as /usr/share/php for your PBX to work properly.

Run your PBX installer, and grab another coffee.

You should now give your PBX webserver permissions on port:XYZ, restart your webserver, add webserver and your PBX into the startup configs and restart the entire server (you dont have to, but i would, just to make sure it works), you may now wish to go for a pee (due to all the coffee consumption earlier).

You should now return to your server, with a PBX ready to configure and cPanel still working. If you haven't managed this, try the following link regarding pbx installation: ...powerpbx.org..pbx.. Read More


Removing cloudlinux from centos

So, I have been looking at how to remove cloudlinux from centos. I found a link Here on how to do it. Here is a snippet from the article:

To convert back to CentOS
Download script: centos2cl (http://repo.cloudlinux.com/cloudlinux/sources/cln/centos2cl)
* Make sure you download latest version of the script before attempting the uninstall

# yum remove liblve-devel 
# sh centos2cl -c
This will remove all LVE related packages and its depend...

To view the rest please read the article. Hope this can help others. Read More