ThinkCore W311/321/341 Linux User’s Manual Managing Communications
4-30
;;
restart)
stop
start
;;
*)
echo “Usage: $0 [start|stop|restart]”
exit 1
esac
exit 0
#---------------------------------- end -----------------------------

Create link symbols to enable this script at boot time:

# ln -s /etc/openvpn/openvpn-bridge /etc/rc.d/rc3.d/S32vpn-br # for example
# ln -s /etc/openvpn/openvpn-bridge /etc/rc.d/rc6.d/K32vpn-br # for example

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 --show—auths

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.