Moxa UC-8410A-T-LX [58/86] Openvpn

Moxa UC-8410A-LX [58/86] Openvpn
UC-8410A Series Linux Software General Debian Package Usage
5-18
NOTE
Click the following links fo
r more information on MIB II.
http://www.faqs.org/rfcs/rfc1213.html
https://wiki.debian.org/SNMP
OpenVPN
The OpenVPN package is installed but disabled by default. Use the insserv d openvpn command to enable
OpenVPN package at the next bootup. To enable the OpenVPN package with immediate effect, you can use the
/etc/init.d/openvpn start command.
OpenVPN supports user/pass, pre-shared key, certificates, etc., to authenticate users. To begin with, check to
make sure that the system has a virtual device /dev/net/tun.
An Ethernet bridge is used to connect different Ethernet networks together. The Ethernets are bundled into one
bigger, “logical” Ethernet. Each Ethernet corresponds to one physical interface (or port) that is connected to the
bridge. Type the following command to load driver “tun”.
# modprobe tun
On each OpenVPN machine, you should generate a working directory, such as /etc/openvpn, where script
files and key files reside. Once established, all operations will be performed in that directory.
The OpenVPN daemon is installed but disabled by default.
Enable openvpn manually sudo /etc/init.d/openvpn start
Disable openvpn manually sudo /etc/init.d/openvpn stop
Enable openvpn insserv -d openvpn
Disable openvpn insserv -r openvpn
Static-Key VPN
In the server’s /etc/openvpn directory, run the following command to generate a static key
moxa@Moxa:/etc/openvpn$ sudo openvpn --genkey --secret static.key
Copy this static key to the clients /etc/openvpn directory using a secure channel like scp or sftp.
On the server, create a new /etc/openvpn/tun0.conf file and add the following:
dev tun0
ifconfig 10.9.8.1 10.9.8.2
secret /etc/openvpn/static.key
This is where 10.9.8.x is your VPN subnetwork, 10.9.8.1 is the IP of the server, and 10.9.8.2 the IP of the client.
On the client, copy /etc/openvpn/static.key from the server and create a new /etc/openvpn/tun0.conf file, and
then add the following to the file:
remote your-server.org
dev tun0
ifconfig 10.9.8.2 10.9.8.1
secret /etc/openvpn/static.key
Start OpenVPN by hand on both sides with the following command:
moxa@Moxa:/etc/openvpn$ sudo openvpn --config /etc/openvpn/tun0.conf --verb 6 //
verbose output.

Содержание

Скачать