Allocate a fixed IP address to OPENVPN

Source: Internet
Author: User
OPENVPN assigns a fixed IP address-general Linux technology-Linux technology and application information. For more information, see. The younger brother has just configured OPENVPN to run properly (certificate authentication and radius username and password authentication). Now I want to configure a fixed IP address for the customer.
If the fixed IP address configured in the certificate authentication method is normal, the configured IP address can be obtained. If the user service name and password authentication method are used, the configured IP address cannot be assigned.

Added to server configuration
Username-as-common-name

The following are server configurations:

Local 192.168.1.20
Port 1194
Proto tcp

Dev tun

Ca/root/openvpn-2.1.1/easy-rsa/2.0/keys/ca. crt
Cert/root/openvpn-2.1.1/easy-rsa/2.0/keys/server. crt
Key/root/openvpn-2.1.1/easy-rsa/2.0/keys/server. key
Dh/root/openvpn-2.1.1/easy-rsa/2.0/keys/dh1024.pem
Client-config-dir/usr/local/etc/ccd
# Route 10.9.0.0 255.255.255.252

# Ifconfig-pool-persist/usr/local/etc/ipp.txt

Server 10.8.0.0 255.255.255.0

Client-to-client
Keepalive 10 120

Duplicate-cn
Comp-lzo

Persist-key
Persist-tun
Status/root/openvpn-2.1.1/easy-rsa/2.0/keys/openvpn-status.log
Verb 4



Push "dhcp-option DNS 218.85.157.99"

Plugin/usr/local/etc/radiusplugin. so/usr/local/etc/radiusplugin. conf

Client-cert-not-required

Username-as-common-name


Client2 configuration under CCD
Ifconfig-push 10.9.0.1 10.9.0.2

Client Configuration:
Client
Dev tun
Proto tcp
Remote IP address 192.168.1.20 1194
Persist-key
Persist-tun
Ca/usr/local/etc/ca. crt
# Cert/usr/local/etc/keys/client2.crt
# Key/usr/local/etc/keys/client2.key
Auth-user-pass/usr/local/etc/user. conf
Ns-cert-type server
Comp-lzo
Verb 3
Redirect-gateway def1
Status/usr/local/etc/openvpn-status.log



Can a fixed IP address be configured only in the certificate mode?

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.