User`s manual

UC-7400-LX Plus User’s Manual Managing Communications
4-21
3. On machine OpenVPN A, modify the remote address in the configuration file,
/etc/openvpn/tap0-br.conf.
# /etc/openvpn/tap0-br.conf
# 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/tap0-br.sh
Then modify the routing table in /etc/openvpn/tap0-br.sh script file.
#----------------------------------Start------------------------------
#!/bin/sh
# /etc/openvpn/tap0-br.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 ------------------------------
On machine OpenVPN B, modify the remote address in the configuration file,
/etc/openvpn/tap0-br.conf.
# /etc/openvpn/tap0-br.conf
# 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/tap0-br.sh
Then modify the routing table in /etc/openvpn/tap0-br.sh script file.
#----------------------------------Start------------------------------
#!/bin/sh
# /etc/openvpn/tap0-br.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 by specifying cipher. To see which ciphers are available, type:
# openvpn --show-ciphers
4. After configuring the remote peer, we can load the bridge into kernel, reconfigure eth1 and
enable IP forwarding on both OpenVPN machine.
# /etc/openvpn/openvpn-bridge start
Then start both of OpenVPN peers,
# openvpn --config /etc/openvpn/tap0-br.conf &
If you see the line “Peer Connection Initiated with 192.168.8.173:1194” on each machine, the
connection between OpenVPN machines has been established successfully on UDP port 1194.
NOTE
You can create link symbols to enable the /etc/openvpn/openvpn-bridge script at boot time:
# ln -s /etc/openvpn/openvpn-bridge /etc/rc.d/rc3.d/S32vpn-br
# ln -s /etc/openvpn/openvpn-bridge /etc/rc.d/rc6.d/K32vpn-br