Vpn server configuration
Configuration process:
[Root @ sv ~] # Pacman-Syu # update the system [root @ sv ~] # Pacman-S pptpd # install the pptpd service [root @ sv ~] # Cat/etc/pptpd. conf # cp/usr/share/doc/pptpd/samples/pptpd. conf/etc/pptpd. confoption/etc/ppp/options.ppt pdstimeout 2 debuglocalip 172.28.1.1 # Local IPremoteip 172.28.1.240-254 ####################### ########################## [root @ sv ~] # Cat/etc/ppp/options.ppt pd # cp/usr/share/doc/pptpd/samples/options.ppt pd/etc/options.ppt pdname pptpdrefuse-paprefuse-chaprefuse-mschaprequire-mschap-v2require-mppe-128ms-dns 8.8.8ms-dns placement ###### ######################################## #### [root @ sv ~] # Cat/etc/ppp/chap-secrets # Secrets for authentication using CHAP # client server secret IP addressest4x pptpd admin *############### ################################### [root @ sv ~] # Sysctl-w net. ipv4.ip _ forward = 1 # set kernel support forwarding [root @ sv ~] # Iptables-t nat-a postrouting-o eth0-j MASQUERADE # Support for NAT [root @ sv ~] # Iptables-t nat-a postrouting-s 172.28.1.0/24-o eth1-jMASQUERADE [root @ sv ~] # Systemctl start pptpd
Vpn client configuration
Client:
[Root @ hz ~] # Yum install pptp-setup [root @ hz ~] # Pptpsetup -- create vpn -- server x. x. x. x -- username byrd -- password xxxxxx -- encrypt -- startUsing interface ppp0 Connect: ppp0 <-->/dev/pts/1 CHAP authentication succeededMPPE 128-bit stateless compression enabledlocal IP address 192.168.0.234remote IP address 192.168.0.1 [root @ hz ~] # Pptpsetup -- delete vpn [root @ hz ~] # Ll/etc/ppp/peers/total 8-rw-r -- r -- 1 root 149 Apr 28 10:37 vpn [root @ hz ~] # Ifconfig ppp0 Link encap: Point-to-Point Protocol inet addr: 192.168.0.234 P-t-P: 192.168.0.1 Mask: 255.255.255.255 up pointopoint running noarp multicast mtu: 1496 Metric: 1 RX packets: 6 errors: 0 dropped: 0 overruns: 0 frame: 0 TX packets: 6 errors: 0 dropped: 0 overruns: 0 carrier: 0 collisions: 0 txqueuelen: 3 RX bytes: 60 (60.0 B) TX bytes: 66 (66.0 B) [root @ hz ~] # Pppd call vpn # dial-up vpn [root @ hz ~] # Killall pppd