INSTALL VPN PPTP CLIENT

参考:http://blog.secaserver.com/2012/12/centos-6-install-vpn-pptp-client-simple/

I have a PPTP server which run on Mikrotik Routerboard and I need to connect one of my CentOS 6.3 box to this VPN to retrieve some information from internal server. The VPN account already created in PPTP server and this post will just show on how to connect from CentOS CLI box.

I will be using following variables:

Client OS: CentOS 6.3 64bit
PPTP Server: 192.168.100.1
Username: myvega
Password: CgK888ar$

1. Install PPTP using yum:

$ yum install pptp -y
2. Add the username and password inside /etc/ppp/chap-secrets:

myvega PPTPserver CgK888ar$ *
The format will be: [username][space][server name][space][password][space][ip address allowed]

3. Create a configuration files under /etc/ppp/peers directory called vpn.myserver.org using text editor:

$ vim /etc/ppp/peers/vpn.myserver.org
And add following line:

pty "pptp 192.168.100.1 --nolaunchpppd"
name myvega
remotename PPTPserver
require-mppe-128
file /etc/ppp/options.pptp
ipparam vpn.myserver.org
4. Register the ppp_mppe kernel module:

$ modprobe ppp_mppe
5. Make sure under /etc/ppp/options.pptp, following options are not commented:

lock
noauth
refuse-pap
refuse-eap
refuse-chap
nobsdcomp
nodeflate
require-mppe-128
6. Connect to the VPN by executing following command:

$ pppd call vpn.myserver.org
Done! You should connected to the VPN server now. Lets check our VPN interface status:

$ ip a | grep ppp
3: ppp0: mtu 1456 qdisc pfifo_fast state UNKNOWN qlen 3
link/ppp
inet 192.168.100.10 peer 192.168.100.1/32 scope global ppp0
If you face any problem, kindly look into /var/log/message for any error regards to pppd service:

$ tail -f /var/log/message | grep ppp
Dec 4 04:56:48 localhost pppd[1413]: pppd 2.4.5 started by root, uid 0
Dec 4 04:56:48 localhost pptp[1414]: anon log[main:pptp.c:314]: The synchronous pptp option is NOT activated
Dec 4 04:56:48 localhost pptp[1420]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 1 ‘Start-Control-Connection-Request‘
Dec 4 04:56:48 localhost pppd[1413]: Using interface ppp0
Dec 4 04:56:48 localhost pppd[1413]: Connect: ppp0 /dev/pts/1
Dec 4 04:56:48 localhost pptp[1420]: anon log[ctrlp_disp:pptp_ctrl.c:739]: Received Start Control Connection Reply
Dec 4 04:56:48 localhost pptp[1420]: anon log[ctrlp_disp:pptp_ctrl.c:773]: Client connection established.
Dec 4 04:56:49 localhost pptp[1420]: anon log[ctrlp_rep:pptp_ctrl.c:251]: Sent control packet type is 7 ‘Outgoing-Call-Request‘
Dec 4 04:56:49 localhost pptp[1420]: anon log[ctrlp_disp:pptp_ctrl.c:858]: Received Outgoing Call Reply.
Dec 4 04:56:49 localhost pptp[1420]: anon log[ctrlp_disp:pptp_ctrl.c:897]: Outgoing call established (call ID 0, peer‘s call ID 137).
Dec 4 04:56:49 localhost pppd[1413]: CHAP authentication succeeded
Dec 4 04:56:49 localhost pppd[1413]: MPPE 128-bit stateless compression enabled
Dec 4 04:56:50 localhost pppd[1413]: local IP address 192.168.100.10
Dec 4 04:56:50 localhost pppd[1413]: remote IP address 192.168.100.1
To disconnect the VPN, just kill the pppd process:

$ killall pppd

时间: 2024-10-24 12:12:34

INSTALL VPN PPTP CLIENT的相关文章

VPN pptp on linuxmint13/ubuntu12.04/debian VPS

VPN is a great thing when you are forced to be stuck somewhere. on ubuntu, you need to check out whether your system supports TUN/ 我从这里等得到一些灵感http://www.hostloc.com/thread-33260-1-1.html 还有 http://www.jb51.net/os/Ubuntu/34821.html 但是这些都不适合我的系统.基本上都是c

WIN10连接VPN后无法上网解决办法-WIN10,VPN,PPTP,连接VPN后无法上网,VPN连接右键属性--网络--IPV4,点属性没反应不会弹出对话框

WIN10连接VPN后无法上网解决办法 1.C盘搜索框内搜索rasphone.pbk 2.打开rasphone.pbk(字节不为0的那个文件) 3.IpPrioritizeRemote值全部替换成0(有2个) 重新连接VPN看看 亲测有效!!! 微软官方的文档:http://answers.microsoft.com/zh-hans/windows/forum/windows_10-networking/win10vpnpptp%E8%BF%9E%E6%8E%A5vpn%E5%90%8E/c48

CentOS 6配置VPN     PPTP连接类型的

今天在自己的CentOS6上要连接远端的VPN服务器,但是在安装了下面的两个包以后,在连接配置中选择VPN连接类型的时候没有PPTP的选项 $ sudo yum install pptp   $ sudo yum install NetworkManager-openswan 查了一下也没有弄明白为啥,后来在使用"sudo yum search pptp"命令查找包的时候发现了一个叫pptp-setup的包,抱着试试看的心安装了一下 $ sudo yum install pptp-se

rhel7.2配置vpn pptp google

摘要:你百度一下会死阿?会死!所以我这次下定决心不用百度了,花钱买VPN.但是我工作用的是Linux操作系统,rhel7.2,之前没在linux上用过vpn,所以将操作记录下来,以备后用哈,好记性不如烂笔头呢! Linux使用pptp vpn client 其实很简单的,只是相对文档较少或是落后造成很多Linuxer报怨.下面我简单的列一下操作步骤. 背景:     系统使用Redhat Enterprise7.2(CentOS也支持) [[email protected] ~]# cat /e

vpn pptp配置

安装 yum install pptpd 配置pptpd 改动/etc/pptpd.conf设置 localip 192.168.20.1 remoteip 192.168.20.234-238,192.168.20.245 网段不与本机的网络冲突就可以. 改动/etc/ppp/chap-secrets配置username权限 # Secrets for authentication using CHAP # client server secret IP addresses aca * jj1

ROS vpn (pptp) 配置及端口绑定配置

网络搜集 一. 按VPN的协议分类 VPN的隧道协议主要有三种,PPTP,L2TP和IPSec,其中PPTP和L2TP协议工作在OSI模型的第二层,又称为二层隧道协议:IPSec是第三层隧道协议,是最常见的协议. 二. 按VPN的应用分类 1) Access VPN(远程接入VPN):客户端到网关,使用公网作为骨干网在设备之间传输VPN的数据流量 2) Intranet VPN(内联网VPN):网关到网关,通过公司的网络架构连接来自同公司的资源 3) Extranet VPN(外联网VPN):与

Android 设置VPN(pptp连接方式)

本教程以小米手机的MIUI系统为例子,教大家如何设置VPN 先找到“设置”,打开设置菜单,如下图: 在设置菜单里面找“其它连接方式” 然后找到“VPN”,点击进入: 进入VPN设置界面后,如果VPN未开启,请先开启VPN,然后在界面下方找“添加VPN”按钮,点击进入添加界面: 在添加VPN的界面中,“名称”可以随便填写一个名字,但是类型要选择“PPTP”,这里如果选错,就会连不上,特别注意哦. 服务器地址就填我们给你的 服务器地址  或 拨号地址 . 用户名 和 密码就填我们给你的账号信息. 设

Install Oracle Database client in silent mode

We can save time by using silent mode provided by many software. We can do some other things with saved time. Hope this can help you. Oracle Database client 12.2.0.1 1. reponse file content. below content should be saved as oracle_client_install_1220

Windows 7 中设置VPN(PPTP连接方式)

第一步:打开控制面板-网络和共享中心(如图) 第二步:点击-设置新的连接或网络(如图) 第三步:选择-连接到工作区-下一步(如图) 第四步:如果已经存在其他连接,则在这一步选择”否,创建新连接“:如果没有,则这一步将被跳过(如图) 第五步:选择-使用我的Internet连接(如图) 第六步:Internet地址栏填写ip地址(服务器地址登陆会员中心查看)目标名称填写:vpn(也可以随便填写),勾选-现在不连接,仅进行设置以便稍后连接点击下一步(如图) 第七步:填写你在网站上注册的用户名和密码,点