The company adopts the deep X server gateway, and all Internet devices need to be filtered by the deep X server. Under Windows, we need to install a client of Shenzhen X server, which is called a security desktop or something like that. I heard that it is used to monitor QQ chat records. But I have a server CentOS6.3 in the intranet, and I can't install his client, so I can't talk about the Internet. At the beginning, I could use the yum agent to download the installer, but I couldn't use the yum agent when I used the python pip installer. Therefore, the idea of using a VPN global proxy came out. Get started:
Search for an article: http://www.tuicool.com/articles/Una6RjJ The general scheme is as follows:
1. Install ppp pptp pptp-setup
# yum install ppp pptp pptp-setup
2. Create VPN connection
# pptpsetup --create test --server ip地址 \ --username test --password test --start
If the following error is reported:
FATAL: Module ppp_mppe not found. /usr/sbin/pptpsetup: couldn't find MPPE support in kernel.
Solution:
# modprobe ppp_mppe
3. Connect VPN connection
[root @localhost peers] # pppd call test //The test here is the vpn connection created above
If the following error is reported:
Using interface ppp0
Connect: ppp0 <--> /dev/pts/3
CHAP authentication succeeded
LCP terminated by peer (MPPE required but peer refused)
Modem hangup
Solution:
# vim /etc/ppp/peers/test //test is the connection created above At the end of the file, add the following require-mppe-128
After success, there will be an additional virtual network port ppp0
[root@localhost peers]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 112.124.132.142 192.168.10.1 255.255.255.255 UGH 0 0 0 eth0 192.168.8.1 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0 192.168.10.0 0.0.0.0 255.255.255.0 U 1 0 0 eth0 0.0.0.0 192.168.10.1 0.0.0.0 UG 0 0 0 eth0
But I don't see the gateway of ppp0. So I searched for another article: https://my.oschina.net/fishman/blog/96227 Roughly different places:
This will generate a VPN dial-up account named test, and then edit the account configuration file:
vi /etc/ppp/peers/test
# written by pptpsetup
pty "pptp xxx.xxx.xxx --nolaunchpppd"
lock
noauth
nobsdcomp
nodeflate
name vpnusername
remotename test
ipparam test
defaultroute #使用本连接作为默认路由
persist #当连接丢失时让pppd再次拨号
require-mppe-128
refuse-pap
refuse-chap
refuse-eap
refuse-mschap
I opened the test file and found that the ipparaam test was empty, so I added the missing content.
Then execute the pon command and find that the pon command is unavailable, so I retrieve the article that still needs to be copied:
cp /usr/share/doc/ppp-2.4.5/scripts/pon /usr/sbin/
cp /usr/share/doc/ppp-2.4.5/scripts/poff /usr/sbin/
chmod 755 /usr/sbin/pon
chmod 755 /usr/sbin/poff
start dialing
pon test
Ifconfig can see that the vpn connection ppp0 comes out.
So that's it... bye bye