UC-7400-LX Plus User’s Manual
Managing Communications
4-22
ifconfig br0 down
ifconfig $iface $IPADDR netmask $NETMASK broadcast $BROADCAST
killall -TERM openvpn
}
case “$1” in
start)
start
;;
stop)
stop
;;
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.
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.