Tag Archives: config

turn off grid preview of visited websites in firefox new tab page

If you like me want to have a clean browser, and want to start from a the blank page without any content before you take any action, you can do this since firefox 13:
set the about:config item browser.newtabpage.enabled to false.
I learned it from another website after try a couple of search and finally know that it even has a name new tab page, for details please visit: http://techdows.com/2012/05/disable-firefox-13s-new-tab-page.html

Features like this is pretty annoy, and finally one day, you make a decision to deal with it. And glad there is a good solution to turn it off. The problem comes from that firefox gets auto updated once in a while, and these unwanted features just slipped in.
Aslo remember the last evil feature is it changed the convenient shortcut key ctrl+e used to set keyboard input focus to the search box. And fortunately it changed back after a few releases.

install and config subversion on debian

install is easy, this is the steps to set the server to run everytime system starts, hope there could be an easier way to do so like in windows setup exe in the future.

1 create script

cd /etc/init.d/
touch svnserve
vi svnserve

2 content of the script

#!/bin/bash
### BEGIN INIT INFO
# Provides:          svnserve
# Required-Start:    $local_fs $remote_fs $network $syslog
# Required-Stop:     $local_fs $remote_fs $network $syslog
# Default-Start:
# Default-Stop:
# X-Interactive:     true
# Short-Description: Start/stop svnserve
### END INIT INFO

svnserve -d -r /usr/local/svn/repository_name

3 enable executable privilege
chmod +x svnserve

4 set the script to run when system starts
update-rc.d svnserve defaults

config static dns servers on linux

To config dns server on linux, you need to edit this file: /etc/resolv.conf. If the file doesn’t exist, create a new. And then add the lines like mine & save:
nameserver 192.168.1.1
nameserver 8.8.8.8
nameserver 8.8.4.4

you don’t have to use “nameserver 192.168.1.1″, if you have your own server environment.

After done, you can test with ping command or host/dig command:

ping www.google.com
host www.google.com
dig www.google.com

debian reload interface config after made changes to file: interface

When working on debian through ssh, if you’ve made changes to file: /etc/network/interface, run the command below to reload&apply the changes and avoid to reboot or reconnect ssh:
/etc/init.d/networking restart

Install and setup pptp vpn on debian (pptp 101)

Please follow these steps if you want to setup a pptp vpn from debian:

1. SSH into the debian server

2. Install pptpd with command:

apt-get install pptpd

3. Setup host ip and client ip range. Open file: /etc/pptpd.conf with text editor, and at the content below at the end:

localip 192.168.0.40
remoteip 192.168.0.234-238,192.168.0.245

localip is the ip of your server in the virtual network, remote ip the pool range of the client, will assigned by the server automatically when client connects in. Also, please use the ip range not already use in your real lan, my home lan is in 192.168.1.x, so here I use 192.168.0.x

4. Config pptp dns, open file /etc/ppp/options.pptpd, find the line ms-dns and setup as below:

ms-dns 8.8.8.8
ms-dns 8.8.4.4

Here I setup with google dns, you are free to use your own dns if you have. But safe with google.

5. Setup client account, open file: /etc/ppp/chap-secrets, and add the line like this:

testuser pptpd testpassword *

testuser is the username, testpassword is the password of the client.

6. Setup ip forward in /etc/sysctl.conf, find the line net.ipv4.ip_forward and edit like below:

net.ipv4.ip_forward=1

save the config and run the command below to load the setting:

run sysctl –p

7. Setup iptables, run command like this:

iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o eth0 -j MASQUERADE

Change the 192.168.0.0 to match the value you use in step 3. And you may need be to change eth0 to other values where your internet connection is on.

This is all the steps you need to setup the pptp server. Now you can setup a connection in Control Panel\All Control Panel Items\Network and Sharing Center:

windows pptp client setup

Click the link as the red box show above, and follow the wizard to setup a vpn connect and make a test run.

Know issues:

If you have successfully setup the pptp vpn and able to access websites from it, but you are experiencing strange problem and can’t access some of the sites like: www.alexa.com, check my post here for a possible fix: Can’t access certain sites with pptp

Further Reading:

To setup a IPSec L2TP VPN, you may want to look here:

Setting up an L2TP/IPSec server on Debian
Setting Up an IPSec L2TP VPN server on Ubuntu for Windows clients