Moxa ioPAC 8500-2-M12-C-T [54/69] Moxa c programmable rtu controllers managing communications

Moxa ioPAC 8500-9-RJ45-C-T [54/69] Moxa c programmable rtu controllers managing communications
Moxa C Programmable RTU Controllers Managing Communications
4-17
while :
do
# disconnect tap device from the bridge
brctl delif br0 tap${i}
openvpn --rmtun --dev tap${i}
i=`expr $i + 1`
if [ $i -ge $maxtap ]; then
break
fi
done
brctl delif br0 $iface
brctl delbr br0
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 -----------------------------
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 ------------------------------

Содержание

Скачать