因為工作上主要用centos,這幾天把筆記本也重裝了centos系統,想裝xl2tpd包,結果yum search沒有找到,搜了下,要加個fedora的epel源,項目地址https://fedoraproject.org/wiki/EPEL/zh-cn,編輯/etc/yum.repos.d/epel.repo文件,“priority=3”加到[epel]段,然後yum makecache,yum install xl2tpd.
--------------------------------------------------------------------------------------------------
系統:Debian6.0,256M
有時需要在家處理單位的事,正好同事在防火牆上做了個l2tp的VPN,下面把設置的內容簡單貼出來.
1、安裝xl2tp包
2、修改/etc/xl2tpd/xl2tpd.conf,預設基礎加上以下:
[lac 123] #123這個名字隨便起
lns = x.x.x.x #(VPN接入地址)
redial = yes
redial timeout = 15
require chap = yes
refuse pap = yes
require authentication = yes
name = xxx #(用戶名)
pppoptfile = /etc/ppp/options.123_l2tp #系統預設文件名是options
ppp debug = yes
3、建立options.123_l2tp文件
:~$ cat /etc/ppp/options.123_l2tp
asyncmap 0
noauth
crtscts
lock
hide-password
modem
netmask 255.255.255.0
proxyarp
lcp-echo-interval 30
lcp-echo-failure 4
ipcp-accept-local
ipcp-accept-remote
4、用戶名、密碼格式:用戶名 * “密碼” *
:~$ cat /etc/ppp/chap-secrets
# Secrets for authentication using CHAP
# client server secret IP addresses
xxx * "xxxxxx" *
any * any
5、因為需要輸入幾個命令,自己做了個腳本,見笑!
:~$ cat desktop/xl2tpd_start.sh
#!/bin/bash
# Program:
# xl2tpd VPN start script.
本文出自 「我的學習筆記」 博客,請務必保留此出處http://wangyanwen.blog.51cto.com/1207461/845328
[火星人 ] mark:linux系統l2tpVPN設置已經有1140次圍觀