Ubuntu Phone First Week

 

 

So my first week has gone since i rooted my Nexus 4 and installed the new Ubuntu phone.

It was realy easy to root and install the phone the hole process was done in 30 min including backup.
It has bean I hard week but now at the end life with the phone is better.

So the ONLY things that really work in the phone is.

  • Make and receives calls
  • Send and receives SMS
  • With i browser surf (Only from wifi )

That about it so my connections to the world when Im on the road is dead. No more facebook, Instagram and so on.
I use the browser to look things up if i had to.(This require a start my 4gwifi device)

But now I got to like the interface and thing that thiscan be good.

And it nice when you can connect your phone to the laptop and open an shell into the phone.(Used to sync my gmail contacts to the phone)

There are still some things that are not 100% god you can say some bugs. But its a develop phone now and im now downloading the develop toolkit :-).
So we will see how hard it s to build your own app to the Ubunut phone.

 

2013-10-18 10.16.36

2013-10-21 14.08.49

2013-10-21 14.09.04

Private GIT server on centos 6

So i need to have an private git server. The plan is to fill the git server with my backups so I can see changes done to my git server.

 

Set up the local GIT server

Users

adduser git
passwd git

Become the git user and go to home folder

su git
cd  ~

Create the repo

mkdir myrepo.git
cd myrepo.git/
git --bare init

So now the repo is done lets connect to it and start using it.
As another user i use root

make some ssh keys and add them to the git user

ssh-keygen -t rsa
ssh-copy-id git@localhost

Start using git

git clone git@localhost:myrepo.git
cd myrepo/
touch README
git add .
git commit -m "first"
git config --global user.name "Mattias Hemmingsson"
git config --global user.email matte@aaaelino.se
git push origin master

Happy GIT !

 

Owncloud 5 on Centos 6.4 apache-mysql

How to install owncloud 5 on you centos 6.4 server with mysql and apache to serve it.

First install packages and service needed.

yum -y install mysql-server httpd php php-mysql unzip wget php-json php-xml php-mbstring php-zip php-gd curl php-curl php-pdo mod_ssl

Set apache and mysql to start at boot

chkconfig httpd on
chkconfig mysqld on

Start them up

/etc/init.d/httpd start
/etc/init.d/mysqld start

Make a new file called /tmp/setup_owncloud.sql and put this in the file (Ore past it in the mysql shell)

CREATE DATABASE owncloud;
GRANT ALL PRIVILEGES ON owncloud.* TO 'owncloud'@'localhost' IDENTIFIED BY 'adshjkahdj!223dasdadsasd99uioiuiods';
FLUSH PRIVILEGES;

run the file

mysql -u root < setup_owncloud.sql

TIME for installing OWNCLOUD

So now you can get owncloud from oen repo or downlod the files you can choose.
I downloaded the tar file and use. But read more on owncloud page http://owncloud.org/install/

Fix folders

cd /var/www/html

Download owncloud

wget http://download.owncloud.org/community/owncloud-5.0.12.tar.bz2

Set permissions

chown apache:apache -R owncloud/

Create Apache config with vhosts

<VirtualHost *:80>
 ServerAdmin webmaster@elino.net
 ServerName owncloud.elino.net
 ServerAlias owncloud
 DocumentRoot /var/www/owncloud
 <Directory />
 AllowOverride All
 </Directory>
 <Directory /var/www/owncloud>
 AllowOverride All
 Order allow,deny
 allow from all
 </Directory>
 # Possible values include: debug, info, notice, warn, error, crit,
 # alert, emerg.
 LogLevel warn
 CustomLog logs/own_access.log combined
</VirtualHost>
<VirtualHost *:443>
 ServerAdmin webmaster@elino.net
 ServerName owncloud.elino.net
 DocumentRoot /var/www/owncloud
 SSLEngine On
SSLCertificateFile /etc/httpd/ssl/apache.crt
 SSLCertificateKeyFile /etc/httpd/ssl/apache.key
 <Directory />
 Options FollowSymLinks
 AllowOverride All
 </Directory>
 <Directory /var/www/owncloud>
 Options Indexes FollowSymLinks MultiViews
 AllowOverride All
 Order allow,deny
 allow from all
 </Directory>
 # Possible values include: debug, info, notice, warn, error, crit,
 # alert, emerg.
 LogLevel warn
 CustomLog logs/own_access.log combined
</VirtualHost>

Setup https

mkdir /etc/httpd/ssl
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/httpd/ssl/apache.key -out /etc/httpd/ssl/apache.crt

 

Set up Owncloud

Now its time to set up owncloud surf to you domin for owncloud and press advanced. Put you mysql settings in there that vi created. And choose where to have you data folder.

 

 

Securing Apache – TRACE TRACK XSS

So i will tryi to updated with some tips on securing apache as I stumbel over them.

This will be the first one in not so many I hope (Apache will be secure )
I always scan my servers every month with Openvas as one of my PCI-DSS task. And this week I locking down my Apache servers.

Add this in you vhost file ore in the welcome.conf file and rerun you scan.

 

TraceEnable off

RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]