引言:前段时间一直没空翻译,所以直接贴了英文版的在上面,可能难为了那些英文比我还烂的童鞋(本人至今公共英语四级未通过),今天拿来翻译下,上面一行是英文,下面一行是中文,翻译的不好的地方请大家指教
Installing the Client Program
安装客户端程序
Install PPTP Client from the Ubuntu Project:
从Ubuntu Project安装PPTP客户端
apt-get install pptp-linux
上面那行是命令,在终端输入的,不翻译了
Installing the Configuration Program
安装配置程序
Note: you may wish to skip the configuration program and configure the client by hand.
注意:你可能想要跳过安装配置程序,并且手工配置客户端
1. add the following lines to the sources list file, /etc/apt/sources.list :
1.添加下面几行到源列表,/etc/apt/sources.list
# James Cameron's PPTP GUI packaging
deb http://quozl.netrek.org/pptp/pptpconfig ./
Note: can use a text editor, or simply cat the lines on to the end of the file using >>, but if you make a mistake in formatting you will likely be told by the apt-get update step.
注意:你可以使用文本编辑器,或者使用 >> cat这几行到文件末端,但是如果你的格式出错了,在apt-get update时可能会出问题
2. update the list of packages:
2.更新包列表
apt-get update
上面是命令
3. install the PPTP Client GUI:
3.安装PPTP客户端GUI程序
apt-get install pptpconfig
上面是命令
Note: you may be told that the packages could not be authenticated. For the moment, tell your system to install them anyway. We'll take patches to our release process if anyone can explain simply how to provide authentication.
这句太麻烦,不翻译了,大概意思是如果系统提示无法验证包,请选择无论如何都安装
Configuration, by hand
手工配置
1. obtain from your PPTP Server administrator:
1.从你的PPTP服务器管理员处获取:
* the IP address or host name of the server ($SERVER),
* 服务器的IP地址或名称(下面用$SERVER代替)
* the name you wish to use to refer to the tunnel ($TUNNEL),
* VPN连接的通道名称(下面用$TUNNEL代替)(译者注:一般情况下,通道名称可以自己起,比如我就是用vpn这三个字母做通道名称的)
* the authentication domain name ($DOMAIN),
* 验证域的名称(下面用$DOMAIN代替)(译者注:一般是没有这个东西,留空就好)
* the username you are to use ($USERNAME),
* 拨号用的用户名(下面用$USERNAME代替)
* the password you are to use ($PASSWORD),
* 拨号用的密码(下面用$PASSWORD代替)
* whether encryption is required.
* 是否要求加密
In the steps below, substitute these values manually. For example, where we write $PASSWORD we expect you to replace this with your password.
这句话的内容都在上面的注释里了,不翻译了
2. create or edit the /etc/ppp/options.pptp file, which sets options common to all tunnels:
2.创建或者编辑 /etc/ppp/options.pptp文件,这个是所有通道的共同设置
下面这个是文件的内容
lock noauth nobsdcomp nodeflate
3. create or add lines to the /etc/ppp/chap-secrets file, which holds usernames and passwords:
3. 创建或者添加下面这些行到 /etc/ppp/chap-secrets 文件,这个文件存储用户名和密码
$DOMAIN\\$USERNAME PPTP $PASSWORD * #备注:$DOMAIN可以不要
Note: if you are using a PPTP Server that does not require an authentication domain name, omit the slashes as well as the domain name.
这句是我上面的备注内容,不翻译了
Note: if the passwords contain any special characters, quote them. See man pppd for more details.
注意:如果密码中有特殊字符,用双引号引起来
4. create a /etc/ppp/peers/$TUNNEL file:
4. 创建 /etc/ppp/peers/$TUNNEL 文件内容如下
pty "pptp $SERVER --nolaunchpppd"
name $DOMAIN\\$USERNAME
remotename PPTP
require-mppe-128
file /etc/ppp/options.pptp
ipparam $TUNNEL
Note: if you do not need MPPE support, then remove the require-mppe-128 option from this file and /etc/ppp/options.pptp.
注意:如果你不需要MPPE支持,从这个文件和/etc/ppp/options.pptp删除 require-mppe-128
5. start the tunnel using the pon command:
5. 用pon命令连接VPN
pon $TUNNEL
to further diagnose a failure, add options to the command:
pon $TUNNEL debug dump logfd 2 nodetach
Note: we have further information on enabling debug mode, and on diagnosing problems.
6. stop the tunnel using the poff command:
6. 用poff命令断开连接
poff $TUNNEL
注:上面的翻译已经足够连接上VPN服务器了,下面是讲创建启动脚本的,这里就不翻译了,有空继续下面的翻译
7. to script the tunnel connection so that something is done as soon as the tunnel is up, use either ip-up.d scripts or the updetach keyword.
1. see the Routing HOWTO for examples of ip-up.d scripting that adds routes or iptables rules.
2. using updetach will cause pppd to fork, detach, and exit with success once the network link is up. This example connects a provider link, then the tunnel, then runs fetchmail to get new e-mail:
pon provider updetach && pon $TUNNEL updetach && fetchmail
Note: the double ampersand && means that the commands following it will only be executed if the command to the left of it was successful. If the tunnel fails to connect, the fetchmail will not happen.
8. to have the tunnel automatically restarted if it fails, add the option persist to either the command line or the /etc/ppp/peers/$TUNNEL file.
9. to have the tunnel started on system boot:
* for Debian Sarge and later, edit the /etc/network/interfaces file, and add this section:
auto tunnel
iface tunnel inet ppp
provider $TUNNEL
* for Debian Woody, edit the /etc/ppp/no_ppp_on_boot file, remove the first line comment, and change the word provider to the name of your tunnel, so that it looks like this:
#!/bin/sh
...
$PPPD call $TUNNEL
(The line ... means the other lines in the file, it doesn't mean a line with three dots.)
Then rename the no_ppp_on_boot file and make it executable:
# mv /etc/ppp/no_ppp_on_boot /etc/ppp/ppp_on_boot
# chmod +x /etc/ppp/ppp_on_boot
Every time your computer starts, the tunnel will be started automatically.