# Service iptables restart
2. disable SELINUX
# Setenforce 0
# Vi/etc/sysconfig/selinux
---------------
SELINUX = disabled
---------------
Server (routing mode ):
I. network settings
1. enable the server-side route forwarding function
# Vi/etc/sysctl. conf
---------------------
Net. ipv4.ip _ forward = 1
---------------------
# Sysctl-p
2. set nat forwarding:
Note: ensure that the VPN address pool can be routed out of the Internet
# Iptables-t nat
/server.pid--cd/etc/openvpn/--config server.conf
June 16:08:20 ss-usa-odo01.90r.org systemd[1]: Starting OpenVPN robust and highly flexible tunneling application on serve R...
June 16:08:20 ss-usa-odo01.90r.org systemd[1]: started OpenVPN robust and highly flexible tunneling on server .
[root@ss-usa-odo01/etc/openvpn
.
Details of the four servers used in this article:
Code:
IP address of the operating system server in IDC Vpn Mode
Vpn server RedHat 9.0 public network IP1 (China Netcom)
Public Network IP2 (China Telecom)
Guangzhou IDC Vpn client FreeBSD4.9 10.1.0.1
Hebei data center Vpn client RedHat9.0 10.2.0.1
Hangzhou data center Vpn client FreeBsd4.9 10.3.0.1
3.2 Network Security
In addition to the vpn server, vpn clients in other data centers do not need public IP addresses, so the vpn server n
Rotten mud: ubuntu 14.04 OpenVPN server, 14.04 openvpn
This article is written by Xiuyi Lin FengProviding friendship sponsorship, first launched in the dark world
The company branch needs to connect to the company's internal server, but the server only allows access to the company's internal network.
To solve this problem, we plan to use VPN. PPTP is the most widely used solution for VPN in the past, but
-2.0.9-gui-1.0.3-install.exe
22.16.execute openvpn-2.0.9-gui-1.0.3-install.exe. Use the default settings.
3) Copy ca. crt, client1.crt, and client1.key to C: \ Program Files \ OpenVPN \ config. (Different users use different certificates. Each certificate contains two files:. crt and. key, such as client2.crt and client2.key)
4 ). in/root/
" # (unit)
Note: If you do not modify other settings, you can
# Source./vars # Make the variable take effect
#./Clean-all # initialize the keys directory and create the required files and directories
# Ln-s openssl-1.0.0.cnf openssl. cnf # Do SSL configuration file soft chain:
The above is the initialization work. In the future, you still need to initialize the certificate, but you only need to enter the openvpn
Mud: openvpn configuration file details, openvpn configuration file
This document consistsXiuyi Lin FengProviding friendship sponsorship, first launchedThe world
In the previous article "build OpenVPN server in ubuntu 14.04", we mainly explained how to build and use openvpn. In this article, we will detail the config
10.8.0.0 255.255.255.0 Client-to-clientKeepAlive 10 120 Comp-lzo Persist-keyPersist-tunStatus/openvpn-2.0.5/easy-rsa/keys/openvpn-status.logVerb 4 Push "Dhcp-option DNS 10.8.0.1"Push "Dhcp-option DNS 70.88.98.10" # Name server address, how to obtain the following instructionsPush "Dhcp-option DNS 70.88.99.11" # Name server address, how to obtain the following instructionsDescription: Some domain is blocked
configuration items in the vars file:# Vim vars
...# Increase this to 2048 if you# are paranoid. This will slow# down TLS negotiation performance# as well as the one-time DH parms# generation process.export KEY_SIZE=1024...# These are the default values for fields# which will be placed in the certificate.# Don't leave any of these fields blank.export KEY_COUNTRY="JP"export KEY_PROVINCE="JP"export KEY_CITY="Tokyo"export KEY_ORG="heylinux.com"export KEY_EMAIL="guosuiyu@gmail.com"export KEY_OU="M
The first bottleneck of openvpn is that the Tun character device reads and writes frames at one link layer. The reason why the user-mode openvpn process must have the same link-MTU on both ends, it is because each time openvpn reads a complete Ethernet frame from the/dev/NET/TUN character device, there are not many, and the library interface: ssize_t read (int fd
UDP. If the tunnel uses TCP to establish a connection, if the end user uses TCP to ensure the connection, the tunnel does not need to do so. If the end user uses UDP, the tunnel TCP reduces the efficiency of user connection, offset the result of using UDP.4) -- connect-retry N: indicates the number of connection retries, which is only valid when the-Proto parameter is TCP-client.5) -- connect-Timeout N: the Retry Interval of the connection.6) -- auto-Proxy:7)-bind:8)-nobind:9) -- Link-mtu n: co
OpenVPN introduction:OpenVPN can run on most common system platforms and is a VPN solution based on SSL/TLS. OpenVPN can implement layer-2 and layer-3 links based on the TAP/TUN virtual device driver, and provides industry-level encryption based on SSL/TLS, and implements all the features of most common VPN solutions. However, there are not many VPN hardware vendors that integrate
OpenVPN: OpenVPN can run on most common system platforms. it is a VPN solution based on SSL/TLS. OpenVPN can implement link between Layer 2 and Layer 3 based on the TAP/TUN virtual device driver, provide industry-level encryption function based on SSL/TLS, and implement most common VPN solutions... "/>
OpenVPN can run
1.Case Demand Analysis
This case uses the RHEL5 and Windows XP system environment to establish a secure ssl vpn connection 8.2 for two remote LAN and remote network management workstations across insecure Internet networks ).
The gateway servers of Beijing headquarters and Shanghai Branch both use the RHEL5 system. OpenVPN must be configured separately to connect two remote LAN LAN1 and lan2. In addition, the network management workstation located on
Download and install openvpn:Use flashget or any other method to download the openvpn installation package and install it. Remember to select the easy-RSA script,The bat script used to manage the CA.Http://openvpn.se/files/install_packages/openvpn-2.0.5-gui-1.0.3-install.exeAfter installation, easy-RSA is in the c: \ Program Files \ openvpn \ directory.Start conf
-warningsredirect-gatewayca/etc/openvpn/ca. crtcert/etc/openvpn/client. crtkey/etc/openvpn/client. keycomp-lzoverb 4 generally, you may need to modify the red content. Change the red content to the actual location of the three files. Save the settings. Connect to OpenVPN aft
OpenVPN-ng: The application-layer tunnel for Mobile Life, And openvpn-ng Application LayerVPN makes people think that it is always a good thing and a way to escape from supervision. In fact, VPN has become the only synonym for escaping from supervision. You see, no matter what technology, IPSec, or WEB Proxy, as long as it is the technology that encrypts the original information, it can all be called VPN, s
, this directive will configure# All clients to redirect their default# Network gateway through the VPN, causing# All IP traffic such as web browsing and# And DNS lookups to go through the VPN# (The OpenVPN server machine may need to NAT# Or bridge the TUN/TAP interface to the internet
# In order for this to work properly ).Push "redirect-gateway def1 bypass-dhcp"
# Certain Windows-specific network settings
) (advanced) Create a script that dynamically modifies a firewall rule that responds to a different customer.# For more information about learn-address scripts, please refer to the Official manual page.; learn-address./script
# If this directive is enabled, the default gateway for all clients will be redirected to the VPN, which will cause all client traffic, such as Web browsers, DNS queries, to be VPN.# (to ensure it works, the OpenVPN server's com
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.