Archive | Tips and Tricks

How to add Graphical Desktop to Low end VPS

GUI Graphical Desktop LXDE on Ubuntu VPS server with low RAM configuration.
Few steps to install a graphical environment (GUI) on a Linux VPS server and VNC server to let you connect to your VPS GUI desktop from your computer and to use VPS server as a desktop computer, run Firefox and other programs. We will install LXDE desktop, which is more suitable for a low RAM VPS plan.

Update the packages list
1) root@server:~# apt-get update
Upgrade the packages currently installed on the VPS
2) root@server:~# apt-get upgrade
Install packages needed for GUI desktop
3) root@server:~# apt-get install xorg lxde-core tightvncserver
Set password
4) root@server:~# tightvncserver :1
Kill the current vnc server
5) root@server:~# tightvncserver -kill :1
Edit vnc start up file config ~/.vnc/xstartup
6) root@server:~# vi ~/.vnc/xstartup
And in the end of the file add 2 new lines:
lxterminal &
/usr/bin/lxsession -s LXDE &

It should appear like the following:

xrdb $HOME/.Xresources
xsetroot -solid grey
#x-terminal-emulator -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
#x-window-manager &
# Fix to make GNOME work
lxterminal &
/usr/bin/lxsession -s LXDE &

Start vnc server
7) root@server:~# vncserver :1 -geometry 1024x768 -depth 16 -pixelformat rgb565
8) connect to your vps using a vnc viewer to IP:5901 where IP is your vps ip address and 5901 the vnc server port
Popular VNC viewers and

Install Firefox browser
9) root@server:~# apt-get install firefox



How to stop Small DDOS attacks


Q. How to identify the IP that is attacking you

A. In order to verify the number of concurrent connections from all clients that are connected to your linux Box

Issue the following command.

netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

It will show a list of the current active connections by IP address and the offending IP is usually the one with a high number of connections:

1 Address
1 servers)

In the example above the first number is the number of connections followed by the Originating IP address, the results of the netstat command used are sorted by number of connections so your offender is usually at the end, (note that there maybe several offending IPs most of the times from anonymous proxies).
In this case the offending IPs are those with 78+ connections

Now we need to block the offending IPs with IPTABLES rules and then kill the ongoing ddos TCP connections.

Syntax to block an IP address under Linux:

iptables -A INPUT -s IP_ADDRESS -j DROP

Replace IP_ADDRESS with the actual IP address, example: iptables -A INPUT -s -j DROP

If you have IP tables firewall script, add above rule to your script.

If you just want to block access to one port from an ip to port 80 then type command:

iptables -A INPUT -s -p tcp –destination-port 80 -j DROP

Now we need to kill the connections still ‘active' with the program tcpkill:

tcpkill is part of dsniff tools suite for linux to sniff network traffic for cleartext insecurities

This package contains several tools to listen to and create network traffic:

arpspoof – Send out unrequested (and possibly forged) arp replies.
dnsspoof – forge replies to arbitrary DNS address / pointer queries on the Local Area Network.
dsniff – password sniffer for several protocols.
filesnarf – saves selected files sniffed from NFS traffic.
macof – flood the local network with random MAC addresses.
mailsnarf – sniffs mail on the LAN and stores it in mbox format.
msgsnarf – record selected messages from different Instant Messengers.
sshmitm – SSH monkey-in-the-middle. proxies and sniffs SSH traffic.
sshow – SSH traffic analyser
tcpkill – kills specified in-progress TCP connections.
tcpnice – slow down specified TCP connections via “active” traffic shaping.
urlsnarf – output selected URLs sniffed from HTTP traffic in CLF.
webmitm – HTTP / HTTPS monkey-in-the-middle. transparently proxies.
webspy – sends URLs sniffed from a client to your local browser.

What interests you here is tcpkill, first we need to install dsniff.


apt-get install dsniff

Then we run:

tcpkill host IP_ADDRESS

where IP_ADDRESS is replaced with the identified offending IP address.


How to move your WordPress site to a new VPS using Command Line

There are several reasons for you to want to move your WordPress site to a VPS, most notably, your site has outgrown shared hosting or you want to improve performance by leveraging caching functionality. Transferring a WordPress site is not complicated if you do your prepwork first.

Step 1: Prepping your old WordPress site for transfer

A WordPress installation has main components:

1) The installation (the files)
2) The database

You will need to prep both of these to transfer. This tutorial covers transferring your Wordpres site using SSH. This is the fastest but not recommended for people who are unfamiliar using SSH.

Open your (PuTTY or SecureCRT for Windows users) and type the command to connect to your old host.

Once you log in, navigate to the directory where your WordPress is installed.

Once you’re at your WordPress installation, you will need to get a dump of the MySQL database. To do this, you’ll need to know the database name, the server, the username, and password. If you don’t remember this information, it is all in your wp-config.php file located in the root directory of your wordpress installation. Get the dump using the following command:


* USERNAME is your database username
* DATABASENAME is the name for your database
* FILENAME.sql is the name of the file you wish to export your database to. It can be anything as long as you remember the name.

Once you are done with the database dump you will want to compress all your WordPress files and you SQL file into one to make the transfer easier. Make sure you are in your WordPress directory. To compress all the files run the following command to compress everything into a file called wordpress.tar.gz:

tar cvzf wordpress.tar.gz *

The tar command will not save hidden files in the current directory, if you have .htaccess file then save it to copy to the new WordPress directory on the new VPS

Step 2: Importing your WordPress Install on your NEW VPS

Next you will need to create a database and a database user for your WordPress installation.

mysql -u root -p

Create a new mysql database or use the db name used on the old VPS:

mysql> CREATE DATABASE wordpress;
mysql> GRANT ALL PRIVILEGES ON wordpress.* TO "wpuser"@"localhost" IDENTIFIED BY "password";
mysql> quit

* wordpress is your mysql database name
* wpuser is your mysql username
* password is your mysql username password
* any of these can be changed as long they match the credentials in the wp-config.php

Next you will need to move your compressed site (wordpress.tar.gz) from your old server to your new VPS.
You can use a ftp client or scp to upload the file in the website root directory:

from the old vps server command line:
scp -P22 wordpress.tar.gz user@newvpsip:/var/www/
or downloading it from the new vps server:
scp -P22 user@oldvpsip:/var/www/wordpress.tar.gz .

* scp is the command line program to transfer files securely
* -P tell scp the server port to connect to (the port ssh server is listening to)
* /var/www is the wordpress root directory path, it could differ depending by your new/old vps apache configuration

Once the file (wordpress.tar.gz) has finished transferring and then moved to the wordpress root directory in the new VPS, untar using:

tar xvzf wordpress.tar.gz

This should have uncompressed all your files. You can verify by using the ls command.

As mentioned before the tar command in the compressing process did not pack the root directory hidden files, most likely the only file
you need is .htaccess, copy it in the new vps wordpress root directory.
Also you need to give the apache user ownership to all the uncompressed files, in the wordpress root directory write the following command:

chown -R www-data.www-data *

* www-data.www-data is user and group (separated by a dot) for apache files, nowdays www-data is the common username & group, it could be different. By using the ps aux command line you can see which user is running the apache process

The next step is to import the sql file you created earlier, into the database you just created. It’s another command line:

mysql -u wpuser -p wordpress < filename.sql

* wpuser is your mysql username
* wordpress is your mysql database name

At this point assuming you have set up apache configuration for the new vps the next step is to configure DNS to point your website to the new VPS IP.


Come collegarsi ad un sito oscurato

no censura

La soluzione definitiva per tornare a collegarsi ai siti oscurati è cambiare i dati della connessione internet riguardante i DNS server.
Ogni fornitore di servizio adsl al momento della sottoscrizione fornisce al cliente i propri indirizzi dei server DNS.

Cosa sono i dns server?
Sono dei programmi installati su computers online definiti server che gestiscono e servono alla translazione di un nome di sito internet in un indirizzo di tipo numerico ( esempio,, etc), senza di essi saremmo tutti costretti a ricordare e usare sequenze di numeri ogni volta si volesse accedere ad un sito internet e intranet.

da wikipedia:
La possibilità di attribuire un nome testuale facile da memorizzare a un server (ad esempio un sito world wide web) migliora di molto l'uso del servizio, in quanto gli esseri umani trovano più facile ricordare nomi testuali (mentre gli host e i router sono raggiungibili utilizzando gli indirizzi IP numerici). Per questo, il DNS è fondamentale per l'ampia diffusione di internet anche tra utenti non tecnici, ed è una delle sue caratteristiche più visibili.
È possibile attribuire più nomi allo stesso indirizzo IP (o viceversa) per rappresentare diversi servizi o funzioni forniti da uno stesso host (o più host che erogano lo stesso servizio).


ogni volta che un cliente adsl/mobile/etc tenta ad esempio di collegarsi a un sito internet (es. , il programma che sta usando (es. firefox) per una frazione di secondo, lontano dagli occhi dell' utente, fa una richiesta al server dns del proprio provider (es. infostrada, telecom, tiscali, etc),  i cui indirizzi sono stati impostati nel computer al momento della configurazione internet ( fatta manualmente o da un programma fornito dal provider ), ed esso risponde fornendo in questo caso a firefox l' IP numerico. Tutti i programmi che si collegano a siti internet effettuano sempre questa operazione.

Quando un sito viene oscurato tutti i fornitori di servizi italiani vengono obbligati a modificare la configurazione interna dei loro server DNS in modo da falsare la translazione del nome testuale in IP numerico per far si che l'utente venga reindirizzato verso un'altra destinazione oppure che riceva un messaggio di errore.

Per fare un esempio è come se tutti noi consultassimo esclusivamente le pagine bianche per sapere l'indirizzo di una persona e l'indirizzo poi risultasse sbagliato, nel caso delle pagine bianche si tratterebbe di un errore , in internet invece qualcuno ci mette le mani e cambia l'indirizzo così da farci sbagliare.

Come fare?

Sostituire nella configurazione del computer i dns forniti dal provider con altri non soggetti alle restrizioni italiane.

I più noti e usati in tutto il mondo sono i dns di google e opendns



Gli utenti che non hanno pratica con il computer di solito hanno paura di fare errori e lasciano perdere.
Bene Sappiate che seguendo le guide video non ci sono possibilità di errori, non state mettendo mano in
configurazioni ultra complicate, anzi, dovete fare solo un paio di copia e incolla e qualche click.
Inoltre i DNS server di google funzionano meglio di quelli forniti dal vostro fornitore e una volta
fatto raccomandate la sostituzione dei dns ai vostri conoscenti, contro la censura!




Usare un programma chiamato DnsJumper scaricabile da QUI

Screenshot - 19_07_2014 , 20_14_53

Seleziona una scheda di rete: si apre una tendina, selezionate una voce che assomigli a quella in figura

Seleziona un Server DNS: come in figura

CliccareApplica DNS

Se qualcosa non dovesse funzionare provare a cambiare solo la voce riguardo la scheda di rete

Altrimenti seguire le procedure nei video a seconda del sistema operativo:








MAC Leopard



Cliccare qui


Powered by WordPress. Designed by WooThemes