This article is a mirror article of machine translation, please click here to jump to the original article.

View: 13387|Reply: 0

[VPN] Configure the VPN in Redhat Enterprise Server 6.3

[Copy link]
Posted on 3/18/2015 9:42:25 PM | | |

1. Software

dkms、kernel_ppp_mppe、pptpd

TwoDownloadSoftware

wget http://sourceforge.net/projects/poptop/files/mppe%20module%20builder/dkms-2.0.10-1/dkms-2.0.10-1.noarch.rpm/download

wget http://sourceforge.net/projects/poptop/files/mppe%20module%20builder/kernel_ppp_mppe-1.0.2%20dkms-2.0.6/kernel_ppp_mppe-1.0.2-3dkms.noarch.rpm/download

wget ftp://rpmfind.net/linux/epel/6/x86_64/pptpd-1.4.0-3.el6.x86_64.rpm

3. Installation

1. Install GCC

yum -install gcc

2. Install DKMS

rpm –ivh dkms-2.0.10-1.noarch.rpm

3. Install kernel_ppp_mppe

rpm –ivh kernel_ppp_mppe-1.0.2-3dkms.noarch.rpm

4. Install PPTPD

rpm –ivh pptpd-1.4.0-3.el6.x86_64.rpm

4. Configure the VPN server

1. Configure the master profile

vim /etc/pptpd.conf at the end:

debug

ppp/usr/sbin/pppd

option/etc/ppp/options.pptpd

localip118.193.75.110

remoteip 192.168.0.2-4

Note: localip is the IP address of the local network. remoteip is the IP address range assigned to the VPN client that you are connected to.

2. Configure the account file

vim /etc/ppp/chap-secrets

The edit content is (* in IP represents all):

# Secrets for authentication using CHAP

# client server secret IP addresses

Username pptpd password *

Username pptpd password 192.168.0.3

Username pptpd password 192.168.0.4

3. Start the service

service pptpd start

4. Check the port: netstat -ntpl

The 1723 port used by PPTP listens

5. Set up NAT and turn it onLinuxKernel routing capabilities

Run the following command in turn:

iptables -t nat -F

iptables -t nat -A POSTROUTING -s 192.168.0.2/24 -j SNAT --to 118.193.75.110

echo 1 > /proc/sys/net/ipv4/ip_forward

6. Configure VPN to start automatically

Execute the command: ntsysv

7. Set iptables to allow VPN connections (or disable firewalls)

Execute the command in turn:

iptables-I INPUT -p tcp --dport 1723 -j ACCEPT

iptables-I INPUT -p tcp --dport 47 -j ACCEPT

iptables -I INPUT -p gre -j ACCEPT

8.

5. Use a VPN client to access

The server IP address is 118.193.75.110 as we configured above, and the account number and password are also set in the configuration file






Previous:Oracle system predefined exceptions and user-defined exceptions
Next:"Wealth and Chess Game" - revealing the inside story of love, workplace, and postgraduate entrance examination
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com