How To: PPTP VPN on Ubuntu 12.04 (pptpd)

PPTP VPN on Ubuntu 12.04 (pptpd)

Install Software sudo apt-get install pptpd ufw Allow Ports 22 and 1723…

Install Software
sudo apt-get install pptpd ufw

Allow Ports 22 and 1723 on UFW and Enable UFW
Warning: if you are connected to SSH on a port other than 22, please adjust the first command accordingly so you don’t get kicked off.

sudo ufw allow 22
sudo ufw allow 1723
sudo ufw enable

Edit /etc/ppp/pptpd-options
use your favourite editor in this case I use “sudo nano /etc/ppp/pptpd-options” and make sure you have the following parameters for encryption.

refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128

What Most Schools Don't Teach - Short Film

What Most Schools Don’t Teach

Learn about a new “superpower” that isn’t being taught in 90% of…

Learn about a new “superpower” that isn’t being taught in 90% of US schools.

Starring Bill Gates, Mark Zuckerberg, will.i.am, Chris Bosh, Jack Dorsey, Tony Hsieh, Drew Houston, Gabe Newell, Ruchi Sanghvi, Elena Silenok, Vanessa Hurst, and Hadi Partovi.

Directed by Leslie Chilcott. Executive producers Hadi and Ali Partovi.

Server

How to Use the vi Editor

This help note explains the basics of vi: opening and closing a…

This help note explains the basics of vi:

  • opening and closing a file
  • moving around in a file
  • elementary editing

vi has many other commands and options not described here. The following resources can help you get started using the vi editor, and are available at the UW University Book Store:

  • “vi Tutorial.” Specialized Systems Consultants (SSC).
  • “vi Reference.” Specialized Systems Consultants (SSC).
  • “Learning the vi Editor.” Linda Lamb, 1990.

Starting vi

You may use vi to open an already existing file by typing

      vi filename

where “filename” is the name of the existing file. If the file is not in your current directory, you must use the full pathname.

Or you may create a new file by typing

      vi newname

where “newname” is the name you wish to give the new file.

Server

FIX: Plesk and Sendmail Problem PHP

From the command line, enter this below. /usr/local/psa/bin/domain -u yourdomain.com -mail_service false…

From the command line, enter this below.

/usr/local/psa/bin/domain -u yourdomain.com -mail_service false

You do not need to restart the server. This tells Plesk to not use the mail server to send mail for that domain. It will then go through the correct MX entry for the domain and send it to an external domain. Specially for those who use Google Apps on Plesk.

You will need to do this for every domain hosted on the server.

Joomla

Use joomla default recaptcha plugin in Your Component or Module

1) Get reCaptcha keys from http://www.google.com/recaptcha 2) Set these keys to reCaptcha…

1) Get reCaptcha keys from http://www.google.com/recaptcha

2) Set these keys to reCaptcha plugin and activate it if it’s not.

3) Put below code where you want to show reCaptcha

//php code
JPluginHelper::importPlugin('captcha');
$dispatcher = JDispatcher::getInstance(); $dispatcher->trigger('onInit','dynamic_recaptcha_1');
//html code inside form tag
<div id="dynamic_recaptcha_1"></div>

4) Put this code where you validating/processing the form

$post = JRequest::get('post');
JPluginHelper::importPlugin('captcha');
$dispatcher = JDispatcher::getInstance();
$res = $dispatcher->trigger('onCheckAnswer',$post['recaptcha_response_field']);
if(!$res[0]){
die('Invalid Captcha');
}

Server

Configure RPMforge Repository on CentOS

Open the RPMforge configuration file /etc/yum.repos.d/rpmforge.repo Add the following text to the…

  1. Open the RPMforge configuration file
    /etc/yum.repos.d/rpmforge.repo
  2. Add the following text to the end of the RPMForge repository entry
    priority=3
  3. Check that you got the priorities set correctly
    yum check-update
    You should output similar to the following:
    Loaded plugins: fastestmirror, priorities

    469 packages excluded due to repository priority protections
Linux

How to Add User To Group in Linux

You can use the useradd or usermod commands to add a user…

You can use the useradd or usermod commands to add a user to a group. The useradd command creates a new user or update default new user information. The usermod command modifies a user account i.e. it is useful to add user to existing group. There are two types of group. First is primary user group and other is secondary group. All user account related information is stored in /etc/passwd, /etc/shadow and /etc/group files to store user information.

useradd Example – Add A New User To Secondary Group

You need to the useradd command to add new users to existing group (or create a new group and then add user). If group does not exist, create it. The syntax is as follows:

useradd -G {group-name} username

In this example, create a new user called neo and add it to group called matrix. First login as a root user (make sure group matrix exists), enter:

grep matrix /etc/group