9 月 232014
 

客户端的使用

要使用到 pptp-setup 软件

yum -y install  pptp-setup

/usr/sbin/pptpsetup –create vpn –server  180.166.126.163 –username topcmm –password topcmm123(*& –encrypt –start

再加上个伪装。

/sbin/route add -net 0.0.0.0 dev ppp0

即可

#############

服务端

安装 pptpd 即可 然后记得安装 做下转发

/sbin/iptables -t nat -A POSTROUTING  -s 192.168.30.0/24  -j MASQUERADE

后来遇到个奇怪的问题,公司的VPN 无法访问部分网页。很是奇怪,而且mac是好的。后来从google里发现一个解决办法:

http://www.wincold.com/archives/99.html

其实他是改配置,我没用他的,去掉加密,在评论里面我看到:

####################

Breadcrumbs says:

2011/04/11 at 11:05

应该是由于mtu值造成的,winxp默认mtu为1400,而pptp默认mtu为1396

所以临时修改办法为linux下运行 ifconfig ppp0 mtu 1400

永久修改ppp0的mtu办法为修改/etc/ppp/ip-up,在倒数第二行也就是exit 0前面加上/sbin/ifconfig $1 mtu 1400

参见:
http://blog.gmsj.org/113.html
http://www.members.optushome.com.au/~wskwok/poptop_ads_howto_7.htm

Reply

#########################

我觉得很符合我遇到的问题,即window有问题,而且mac无问题。测试后,发现果然是mtu的问题,现在windows 也可以上百度了!

后来发现mac也有这个问题,mtu换成了1500,然后windows 和 mac 都无问题。看来最优的还是1500。

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

(required)

(required)

这个站点使用 Akismet 来减少垃圾评论。了解你的评论数据如何被处理

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny