Moxa V2616A-C8-CT-W7E [45/111] Attention

Moxa V2616A-C8-LX [45/111] Attention
V2616A Linux Managing Communications
3-23
2. Generate a preset shared key by typing the following command:
# openvpn --genkey --secret secrouter.key
3. Copy the file that is generated to the OpenVPN machine:
# scp /etc/openvpn/secrouter.key 192.168.8.174:/etc/openvpn
ATTENTION
A
preshared key is located at /etc/openvpn/secrouter.key. You can use it for testing purposes
. We suggest
creat
ing a new key for non-testing purposes.
4. On machine OpenVPN A, modify the remote address in configuration file /etc/openvpn/tap0-br.conf.
# point to the peer
remote 192.168.8.174
dev tap0
port 1194
secret /etc/openvpn/secrouter.key
cipher DES-EDE3-CBC
auth MD5
tun-mtu 1500
tun-mtu-extra 64
ping 40
up /etc/openvpn/tap0-br.sh
#comp-lzo
5. Next, modify the routing table in /etc/openvpn/tap0-br.sh script.
#--------------------------Start---------------------------
#!/bin/sh
# value after “-net” is the subnet behind the remote peer
route add -net 192.168.4.0 netmask 255.255.255.0 dev br0
#----------------------------end---------------------------
6. And then configure the bridge interface in /etc/openvpn/bridge.
#!/bin/bash
# Create global variables
# Define Bridge Interface
br=“br0”
# Define list of TAP interfaces to be bridged,
# for example tap=“tap0 tap1 tap2”.
tap=“tap0”
# Define physical ethernet interface to be bridged
# with TAP interface(s) above.
eth=“eth1”
eth_ip=“192.168.8.173”
eth_netmask=“255.255.255.0”
eth_broadcast=“192.168.8.255”
#gw=“192.168.8.174”
...
7. Start the bridge script file to configure the bridge interface:
# /etc/openvpn/bridge restart
8. On machine OpenVPN B, modify the remote address in configuration file
/etc/openvpn/tap0-br.conf.
# point to the peer
remote 192.168.8.173
dev tap0

Содержание

Похожие устройства

Скачать