I'm a rookie 131 2022-01-26 10:09:17 阅读数:455
Building a pptp v_p_n Environmental Science , And test the v_p_n Whether the network can communicate normally , Requirements are as follows
windows Virtual machines are used , The system used is Windows10 pro
The host required by the experimental environment and the corresponding ip The settings are shown in the table
Host name | IP Address |
---|---|
Windows host | 201.1.2.20 |
proxy | eth0 192.168.19.130 |
eth3 201.1.2.5 |
Experimental Topology
1) Install package
yum install ppp pptp net-tools iptables
wget http://mirror.centos.org/centos/7/os/x86_64/Packages/ppp-devel-2.4.5-34.el7_7.x86_64.rpm
yum -y install ppp-devel-2.4.5-34.el7_7.x86_64.rpm
wget https://jaist.dl.sourceforge.net/project/poptop/pptpd/pptpd-1.4.0/pptpd-1.4.0.tar.gz
tar -xf pptpd-1.4.0.tar.gz
cd pptpd-1.4.0/
./configure
make &&make install
mkdir -p /usr/lib/pptpd/
ln -s /usr/local/pptpd/lib/pptpd/pptpd-logwtmp.so /usr/lib/pptpd/pptpd-logwtmp.so
2) Modify the configuration file
vim /etc/pptd.conf
localip 201.1.2.5 # Server local IP
remoteip 192.168.3.1-50 # Assigned to the client IP Address pool
vim /etc/ppp/options.pptp
....
require-mppe-128 # Open notes , May be in 51 That's ok , You can also add
ms-dns 8.8.8.8 # This line needs to add dns service
vim /etc/ppp/chap-secrets
tom * 123456 *
# user name Server identity password client
echo "1" > /proc/sys/net/ipv4/ip_forward # Turn on route forwarding
3) Start the service
/usr/local/pptpd/sbin/pptpd -d -c /etc/pptpd.conf
4) open NAT
iptables -t nat -A POSTROUTING -s 192.168.3.0/24 -j SNAT --to-source 201.1.2.5
# To a private network IP Conversion bit public network IP
iptables -I INPUT -p tcp -m tcp --dport 1723 -j ACCEPT
1723 yes PPTP Default port
1) Input V_P_N Server account and password , Connect v_p_n And test network connectivity
Click... In network settings v_p_n, And then add
Enter the appropriate information
In the network card option , A new network card appears , Or in the connection pptpd The connection of , It indicates that the addition is successful
copyright:author[I'm a rookie 131],Please bring the original link to reprint, thank you. https://en.javamana.com/2022/01/202201261009116385.html