Gentoo安装PPTP/OpenVPN

在Gentoo上安装PPTP/OpenVPN客户端

需要在kernel打开相关选项
1.PPTP参考:
http://en.gentoo-wiki.com/wiki/PPTP

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 Device Drivers --->
   Networking support --->
 
 
   < *> PPP (point-to-point protocol) support
   [ ] PPP multilink support (EXPERIMENTAL)
   [*] PPP filtering
 
 
   <m> PPP support for async serial ports
   </m><m> PPP support for sync tty ports
   </m><m> PPP Deflate compression
   </m><m> PPP BSD-Compress compression
   </m><m> Microsoft PPP compression/encryption (MPPC/MPPE)
 
 
 -*- Cryptographic API  --->
 
 
   </m><m>   SHA224 and SHA256 digest algorithm
   </m><m>   SHA384 and SHA512 digest algorithms
 
 
   </m><m> Deflate compression algorithm
</m>

2.OpenVPN参考:

http://en.gentoo-wiki.com/wiki/OpenVPN

1
2
3
4
Device Drivers --->
   Network device support --->
[*]Network device support
<M>   Universal TUN/TAP device driver support  // This option must be enabled

3.同时升级了一下Linux Kernel到3.0.6
使用之前的.config文件

1
cp config-2.6.39-r3  linux/.config

Copy一下之前的bcm firmware网卡驱动

1
cp linux-2.6.39-gentoo-r3/firmware/bcm43xx-0.fw* linux/firmware/

4.编译,安装新内核

1
2
3
4
5
make -j5
make modules_install
cp arch/x86/boot/bzImage /boot/kernel-3.0.6-gentoo
module-rebuild rebuild
grub2-mkconfig -o /boot/grub2/grub.cfg

5.使用PPTP/OpenVPN

1
2
pptpsetup --create pptpvpn --server 173.255.xx.xx --username xxxx --password xxxx
openvpn --config client.conf

Issues:
1.发现用OpenVPN后,无法解析ip
只好添加一个DNS,添加后一切正常:

1
echo "nameserver 8.8.8.8" >>/etc/resolv.conf

2.安装NetworkManager
http://en.gentoo-wiki.com/wiki/NetworkManager
添加到默认启动

1
rc-update add NetworkManager default

安装nm-applet时,发生了编译错误,参考添加keywords:
http://forums.gentoo.org/viewtopic-t-903500-start-0.html

1
2
  gentoo init.d # grep nm-applet /etc/portage/package.keywords 
 gnome-extra/nm-applet ~x86

3.直接创建一个alias,方便启动OpenVPN

1
alias openvpn_start='cd /etc/openvpn&&sudo openvpn --config client.conf'

Leave a Reply

Your email address will not be published. Required fields are marked *