User`s manual

Moxa C Programmable RTU Controllers Managing Communications
4-21
exit 0
#---------------------------------- end -----------------------------
Run the shell command to start, stop, or restart the OpenVPN
# sh /etc/openvpn/openvpn-bridge start
# sh /etc/openvpn/openvpn-bridge stop
# sh /etc/openvpn/openvpn-bridge restart
3. Create a configuration file named A-tap0-br.conf and an executable script file named A-tap0-br.sh on
OpenVPN A.
# point to the peer
remote 192.168.8.174
dev tap0
secret /etc/openvpn/secrouter.key
cipher DES-EDE3-CBC
auth MD5
tun-mtu 1500
tun-mtu-extra 64
ping 40
up /etc/openvpn/A-tap0-br.sh
#----------------------------------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 ------------------------------
Create a configuration file named B-tap0-br.conf and an executable script file named B-tap0-br.sh on
OpenVPN B.
# point to the peer
remote 192.168.8.173
dev tap0
secret /etc/openvpn/secrouter.key
cipher DES-EDE3-CBC
auth MD5 tun-mtu 1500
tun-mtu-extra 64
ping 40
up /etc/openvpn/B-tap0-br.sh
#----------------------------------Start------------------------------
#!/bin/sh
# value after “-net” is the subnet behind the remote peer
route add -net 192.168.2.0 netmask 255.255.255.0 dev br0
#---------------------------------- end ------------------------------
NOTE: Select cipher and authentication algorithms by specifying “cipher” and “auth”. To see with algorithms
are available, type:
# openvpn --show-ciphers
# openvpn --showauths
4. Start both of OpenVPN peers,
# openvpn --config A-tap0-br.conf&
# openvpn --config B-tap0-br.conf&
If you see the line “Peer Connection Initiated with 192.168.8.173:5000” on each machine, the connection
between OpenVPN machines has been established successfully on UDP port 5000.
5. On each OpenVPN machine, check the routing table by typing the command:
# route