分享
 
 
 

redhat7.2下面配置VPN客户端

王朝other·作者佚名  2008-05-18
窄屏简体版  字體: |||超大  

1.下载ppp-mppe-2.4.0-4.tar.gz(pppd的补丁版),pptp-linux-1.0.3-1.tar.gz

(pptp客户端),假定下载文件放在/opt下

2.安装

解压缩、安装pppd2.4.0

# cd /opt

# tar zxvf ppp-mppe-2.4.0-4.tar.gz -C /opt

# cd /opt/ppp-mppe-2.4.0-4

# sh unpack.sh ;执行这个脚本,给pppd打patch

# cd ppp-2.4-0

# ./configure

# make

# mv /usr/sbin/pppd /usr/sbin/pppd.old ;原来的pppd做个备份

# cp pppd /usr/sbin/pppd ;将新的pppd放入系统路径

解压缩、安装pptp-linux

# cd /opt

# tar zxvf pptp-linux-1.0.3-1.tar.gz -C /opt

# cd /opt/pptp-linux-1.0.3-1

# cp options.pptp /etc/ppp/

# mkdir /etc/pptp.d/ ; 这一步不做也可以

# tar zxvf pptp-linux-1.0.3.tar.gz

# cd pptp-linux-1.0.3

# make

# cp pptp /usr/sbin

# cp pptp-callmgr /usr/bin

3. 设置

# cd /opt/pptp-linux-1.0.3-1

# ./pptp-command

1.) start

2.) stop

3.) setup

4.) quit

What task would you like to do?:3

选3,设置

1.) List CHAP secrets

2.) Add a New CHAP secret

3.) Delete a CHAP secret

4.) List PPTP Tunnels

5.) Add a NEW PPTP Tunnel

6.) Delete a PPTP Tunnel

7.) Configure resolv.conf

8.) Select a default tunnel

9.) Quit

?:2 ;先建立一个CHAP secrets,选择2

Add a NEW CHAP secret.

NOTE: Any backslashes () must be doubled (\).

Local Name:

This is the 'local' identifier for CHAP authentication.

NOTE: If the server is a Windows NT machine, the local name

should be your Windows NT username including domain.

For example:

domain\username

Local Name:pptp ;这里填上pptp的登录用户名称,然后出现

Remote Name:

This is the 'remote' identifier for CHAP authentication.

In most cases, this can be left as the default. If must be

set if you have multiple CHAP secrets with the same local name

and different passwords. Just press ENTER to keep the default.

Remote Name [PPTP]: ;用默认的PPTP就行,所以,回车进入下一项

Password:

This is the password or CHAP secret for the account specified. The

password will not be echoed.

Password: ;在这里敲入密码,密码不回显

回到主选单

Adding secret pptp PPTP *****

1.) List CHAP secrets

2.) Add a New CHAP secret

3.) Delete a CHAP secret

4.) List PPTP Tunnels

5.) Add a NEW PPTP Tunnel

6.) Delete a PPTP Tunnel

7.) Configure resolv.conf

8.) Select a default tunnel

9.) Quit

?: ;此时建立一个新的PPTP Tunnel,选择5

Add a NEW PPTP Tunnel.

1.) Other

Which configuration would you like to use?:1 ;只有这一个,选1

Tunnel Name: test ;给连接起名字test

Server IP: 10.0.0.227 ;vpn服务器的ip

What route(s) would you like to add when the tunnel comes up?

This is usually a route to your internal network behind the PPTP server.

You can use TUNNEL_DEV and DEF_GW as in /etc/pptp.d/ config file

TUNNEL_DEV is replaced by the device of the tunnel interface.

DEF_GW is replaced by the existing default gateway.

The syntax to use is the same as the route(8) command.

Enter a blank line to stop.

route: TUNNEL_DEV ;用提示的输入

route: ;一个就够了,回车结束

Local Name and Remote Name should match a configured CHAP secret.

Local Name is probably your NT domainusername.

NOTE: Any backslashes () must be doubled (\).

Local Name: pptp

Remote Name [PPTP]:

Adding test - 10.0.0.227 - pptp - PPTP

Added tunnel test

1.) List CHAP secrets

2.) Add a New CHAP secret

3.) Delete a CHAP secret

4.) List PPTP Tunnels

5.) Add a NEW PPTP Tunnel

6.) Delete a PPTP Tunnel

7.) Configure resolv.conf

8.) Select a default tunnel

9.) Quit

?:9

退出后再进入程序

# ./pptp-command

1.) start

2.) stop

3.) setup

4.) quit

What task would you like to do?: 1 ;选1,开始

1.) test

Start a tunnel to which server?: test ;在选择要连接的名称

注意:pptp-command这个脚本有个bug,开始连接后不能正常结束程序,并且在连接建立后给出个错误的路由,

# route

Kernel IP routing table

Destination Gateway Genmask Flags Metric Ref Use Iface

10.0.0.227 * 255.255.255.255 UH 0 0 0 ppp0

10.0.0.0 * 255.255.255.0 U 0 0 0 eth0

127.0.0.0 * 255.0.0.0 U 0 0 0 lo

default 10.0.0.1 0.0.0.0 UG 0 0 0 eth0

解决方法为

先删除错误那个错误的路由

# route del 10.0.0.227

然后

# route add -net 10.3.3.0/24 dev ppp0

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有