User`s manual

UC-7400-LX Plus User’s Manual Managing Communications
4-23
2. The configuration procedure is almost the same as for the previous example. The only
difference is that you will need to comment out the parameter “up” in
“/etc/openvpn/tap0-br.conf” and “/etc/openvpn/tap0-br.conf”.
Setup 3: Routed IP
1. Set up four machines as shown in the following diagram:
OpenVPN A
OpenVPN B
Host A
LAN1: 192.168.2.171
Host B
LAN1: 192.168.4.172
LAN1: 192.168.8.174
LAN1: 192.168.2.173
local net
local net
tenretnItenretnI
LAN2: 192.168.4.174
LAN2: 192.168.8.173
2. On machine OpenVPN A, modify the remote address in the configuration file,
/etc/openvpn/tun.conf.
# point to the peer
remote 192.168.8.174
dev tun
secret /etc/openvpn/secrouter.key
cipher DES-EDE3-CBC
auth MD5
tun-mtu 1500
tun-mtu-extra 64
ping 40
ifconfig 192.168.2.173 192.168.4.174
up /etc/openvpn/tun.sh
Then modify the routing table in /etc/openvpn/tun.sh script file.
#----------------------------------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 gw $5
#---------------------------------- end ------------------------------
On machine OpenVPN B, modify the remote address in the configuration file,
/etc/openvpn/tun.conf.
remote 192.168.8.173
dev tun
secret /etc/openvpn/secrouter.key
cipher DES-EDE3-CBC
auth MD5
tun-mtu 1500