[Original] Steps for enabling public Network VPN on Linux Server

Source: Internet
Author: User

-------------------------------------------

Searching for idle public IP addresses in a CIDR Block

-------------------------------------------

1. ifconfig-a view the Linux server's Internet Nic IP address and subnet mask information, through the www.subnet-calculator.com to calculate the IP address range of The Subnet

2. Use iisputner to scan the IP address range, pay attention to the IP address with an empty HTTP banner, and then use zenmap to scan the IP address. If no open port exists, it indicates that the IP address is an idle IP address.

-------------------------------------------

How to enable public Network VPN on a Linux Server

Lab environment: Red Hat Enterprise Linux 5 single Nic

Kernel version: 2.6.18-8. EL5

-------------------------------------------

1. Check whether the kernel supports MPPE.

# Modprobe ppp-compress-18 & Echo congratulations!

Ii. Download pptpd

64-bit Operating System
# Wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-1.rhel5.1.x86_64.rpm

32-bit Operating System
# Wget http://poptop.sourceforge.net/yum/stable/packages/pptpd-1.3.4-1.rhel5.1.i386.rpm

3. Install pptpd

64-bit Operating System
# Rpm-IVH pptpd-1.3.4-1.rhel5.1.x86_64.rpm

32-bit Operating System
# Rpm-IVH pptpd-1.3.4-1.rhel5.1.i386.rpm

4. Edit the/etc/pptpd. conf file

# Vi/etc/pptpd. conf

Localip 192.168.0.20.--> IP address of the server's Internet Nic
Remoteip 192.168.0.160-162 --> enter the CIDR Block assigned to the dial-in user, or enter a separate IP address.

5. Add a VPN user and password

# Vi/etc/PPP/chap-secrets

Jamsbond pptpd jamsbond_007 192.168.0.161 --> Format: VPN user pptpd VPN user password the IP address assigned after the user dials in

6. Set DNS to Google DNS

# Vi/etc/PPP/options.ppt PD

MS-DNS 8.8.8.8
MS-DNS 8.8.4.4

7. Edit the/etc/sysctl. conf file

# Vi/etc/sysctl. conf

Net. ipv4.ip _ forward = 1

# Sysctl-P

8. Restart the pptpd Service

# Service pptpd restart

9. Set pptpd to automatically start upon startup

# Chkconfig pptpd on

10. Disable iptables Firewall

# Service iptables stop

11. Change MTU to solve the problem that the web page cannot be opened after VPN dial.

# Iptables-I forward-s 192.168.0.0/24-P TCP-M TCP -- TCP-flags SYN, RST syn-J tcpmss -- Set-MSS 1300

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.