rkhunter – fix warnings

Warning #1 Warning: Found enabled xinetd service: /etc/xinetd.d/ftp_psa Warning: Found enabled xinetd service: /etc/xinetd.d/poppassd_psa Warning: Found enabled xinetd service: /etc/xinetd.d/smtp_psa Warning: Found enabled xinetd service: /etc/xinetd.d/smtps_psa Warning: Found enabled xinetd service: /etc/xinetd.d/submission_psa Rkhunter and plesk xinetd services Warning #2 Unable to find ‘lsattr’ command – all file immutable-bit checks will Read more…

ufw: firewall

status sudo ufw enable sudo ufw status verbose sudo ufw disable config sudo ufw default deny incoming sudo ufw default allow outgoing sudo ufw allow ssh sudo ufw allow http sudo ufw allow https sudo ufw allow ftp   https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-ubuntu-14-04

install mongodb for php7

sudo apt-get install php7.0-dev ## if apt-get is unable to finde the package # sudo apt-get install ppa-purge # sudo ppa-purge ppa:ondrej/php-7.0 # sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php # sudo apt-get update # sudo apt-get install php7.0-dev pecl -v ## if you see warnings like “unable to find pdo_mysql.so” etc. reinstall Read more…

linux alias / bash alias

Insert into ~/.bash_aliases or ~/.bashrc # basics alias ..=”cd ..” alias ll=’ls -alF’ alias la=’ls -A’ alias l=’ls -CF’ # git alias gco=”git checkout” alias gpu=”git pull” alias gfa=”git fetch –all” More information: http://askubuntu.com/questions/1414/how-to-create-a-permanent-alias

use Fail2Ban to secure your application

Here is an example how to configure Fail2Ban to read your application’s log file and detect malicious requests. The Log File: [2015-03-13 09:55:13] [request xyz] [1.1.1.1] [2015-03-13 09:56:13] [request xyz] [1.1.1.1] [2015-03-13 09:57:13] [request xyz] [1.1.1.1] [2015-03-13 09:58:13] [request xyz] [1.1.1.1] [2015-03-13 09:59:13] [request xyz] [1.1.1.1] The Filter: /etc/fail2ban/filter.d/myfilter.local [Definition] Read more…

creating a vagrant base box from an existing base box

A vagrant Ubuntu Server 32bit 14.04 LTS with Apache, MySQl, PHP and several development tools installed. The server contains the following components: apache mysql php 5.5 sqlite vim git composer nodejs, npm cUrl xdebug The result can be used here: https://atlas.hashicorp.com/alexwenzel/boxes/webdev Prepare the server Initzialize vagrant: vagrant init ubuntu/trusty32 Edit the initial vagrant Read more…

Linux Kommandozeile

Diverses Convert to lowercase for i in $(find . -type f -name “*[A-Z]*”); do mv “$i” “$(echo $i | tr A-Z a-z)”; done Datei verschieben ohne Besitzer zu ändern Geht nur mit ”cp -p” und dann die original Datei löschen. cp -p [source] [target-directory] http://unixhelp.ed.ac.uk/CGI/man-cgi?cp Symlink zwischen Ordnern ln -s Read more…

My Apache cheat sheet

The VirtualHost configuration is located here /etc/apache2/sites-available Defining a VirtualHost <VirtualHost *:80> ServerName app.dev DocumentRoot /var/www/html/my-app/ </Virtualhost> I am using Vagrant on Windows, so I have to add this domain to my Windows hosts file: 192.168.10.10 app.dev The Apache Service and its commands sudo service apache2 [command] Possible commands: start stop graceful-stop Read more…

install nodejs, npm and gulp on ubuntu

The reference can be found here: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager The commands to install nodejs and npm on ubuntu: curl -sL https://deb.nodesource.com/setup | sudo bash – sudo apt-get install nodejs Check nodejs and npm installation: node -v npm -v Install Gulp (global/local): sudo npm install -g gulp sudo npm install gulp –save-dev