Asterisk Blacklist Hobby webbhotell


PPTP Ubuntu

Filed under: Server — Mathz @ 11:47


This guide has been tested with Ubuntu 12.4.2 LTS  Server.


Setup PPTP Server

First we need to install pptp server using apt-get

# sudo apt-get install pptpd

Then we need to configure the pptpd.

# sudo nano /etc/pptpd.conf

Add server IP and client IP at the end of the file. You can add like below:


This sets up the PPTP server to use IP while distributing the IP range to to PPTP clients. Change these as you wish as long as they are private IP addresses and do not conflict with IP addresses already used by your server.

Configure DNS servers to use when clients connect to this PPTP server

# sudo nano /etc/ppp/pptpd-options

Uncomment the ms-dns and add google like below or OpenDNS


Now add a VPN user in /etc/ppp/chap-secrets file.

# sudo nano /etc/ppp/chap-secrets

The column is username. Second column is server name, you can put “pptpd” in there. Third column is password. The last column is the IP addresses, you can put * to allow all IP.

# client        server  secret                  IP addresses
username * myPassword *

Finally start your server

# /etc/init.d/pptpd restart


Setup IP Forwarding

To enable IPv4 forward. Change /etc/sysctl.conf file, add forward rule blew.

# sudo nano /etc/sysctl.conf

Uncomnent the line


Then reload the configuration

sudo sysctl -p

Add forward rule in iptables

# sudo nano /etc/rc.local

adding to the bottom just before the exit 0

iptables -t nat -A POSTROUTING -s -o eth0 -j MASQUERADE
iptables -A FORWARD -p tcp --syn -s -j TCPMSS --set-mss 1356

This example is using 192.168.0 for its PPTP subnet. The second rule adjusts the MTU size :

You are done. Just reboot your server and you should be able to connect to using PPTPD and send all your traffic through this server.


Move an existing SVN repository

Filed under: Uncategorized — Mathz @ 08:24

How do I move an existing SVN repository?
1. On your server machine where the repository is now, run

svnadmin dump /path/to/the/svn/repo > mydumpfile

2. Put that file (mydumpfile) somewhere

3. Create a repository in new location.

4. Import the dump file (mydumpfile) by running:

svnadmin load /path/to/repo/on/ < mydumpfile


WHM domain owner

Filed under: Server — Mathz @ 20:51

Please run the following command in root SSH:

Where is the domain name in question. If it doesn’t show any ownership, then move the following files:

cd /etc
mv userdomains userdomains.bak
mv trueuserdomains trueuserdomains.bak
mv domainusers domainusers.bak

At that point, run the following script and recheck ownership for the domain:


If instead of showing no ownership, the domain showed the wrong ownership, you’d have to edit the /var/cpanel/users/username file that is improperly owning the domain to remove the DNS line that it has for that domain, then run the above move and updateuserdomains commands.

If the ownership is correct, then at that point, try instead checking the Roundcube logs as it has the most accurate logging of the 3 webmail programs. Try to log into the account in Roundcube, and then go to /var/cpanel/roundcube and tail the log:

Also if didn’t fiz run /usr/local/cpanel/bin/updatehorde –force
/usr/local/cpanel/bin/updatesquirrelmail –force
/usr/local/cpanel/bin/updateroundcube –force

Powered by WordPress