To teach you to deploy a remote VPN service using OpenVPN under CentOS 6.3

Source: Internet
Author: User
Tags centos iptables

Today, I saw some people in the group mentioned OpenVPN, just a holiday at home, incidentally, the study of the next.

2 years ago when I was a little white when the old unit even headquarters OA used OpenVPN This client, feel pretty good, and feel that after the project should also be able to use, so Google on the internet a large number of fragmented data, tossing the majority of the day, according to their own understanding on the collation of the following documents, Share them with interested friends.

Recently have been trying to put their own short board, that is, Linux programming this piece of research carefully.

Don't pull it off, get to work.

OpenVPN is a Linux gateway server to use the open source of VPN software, as the name suggests, in fact, is used to access a secure virtual dedicated channel to achieve remote office users, access to intranet resources.

The software can be used across platforms in Linux, Xbsd, Mac OS x and Windows, and using OpenSSL as an encryption library, using encryption certificates or user name/password to achieve authentication, is a rare open source VPN solution.

We do this experiment is to simulate the common online companies outside the company need to visit the intranet OA, to achieve remote office automation.

Solution:

System environment: centos6.3 x64

openvpn:openvpn-2.3.0 (attachment has download)

VPN server:eth0:192.168.100.90,eth1:172.24.30.1

VPN client:192.168.100.34

Intranet server:172.24.30.10

Deployment environment:

1. Empty the default policy and restart Iptables

# iptables-t Nat-f

# iptables-f

# Service Iptables Save

# Service Iptables Restart

2. Close SELinux

# Setenforce 0

# Vi/etc/sysconfig/selinux

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

Selinux=disabled

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

Server side (routing mode):

I. Network settings

1. Turn on server-side routing forwarding function

# vi/etc/sysctl.conf

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

Net.ipv4.ip_forward = 1

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

# sysctl-p

Related Article

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.