Download 1 - Moxa
Transcript
V2101 Series Linux Managing Communications Configuring OpenVPN B: VPN Subnet Client 5. Modify the remote address entry in the VPN configuration file, /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 #comp-lzo 6. Next modify the routing table in the /etc/openvpn/tap0-br.sh script file. #----------------------------------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 ----------------------------7. And then configure the bridge interface script in /etc/openvpn/bridge. #!/bin/bash # Create global variables # Define Bridge Interface br=“br0” # Define list of TAP interfaces to be bridged, # for example tap=“tap0 tap1 tap2”. tap=“tap0” # Define physical ethernet interface to be bridged # with TAP interface(s) above. eth=“eth1” eth_ip=“192.168.8.174” eth_netmask=“255.255.255.0” eth_broadcast=“192.168.8.255” #gw=“192.168.8.173” ... 8. Start the bridge script file to configure the bridge interface. 9. Start the OpenVPN peers that are on machine OpenVPN A and OpenVPN B with the following command: moxa@MOXA:~# /etc/openvpn/bridge restart moxa@MOXA:~# openvpn --config /etc/openvpn/tap0-br.conf& If you see a line that looks like Peer Connection Initiated with 192.168.8.173:5000on each machine, then the connection the Ehternet bridge has been successfully established over UDP port 5000. 10. Check the routing table on each VPN server by typing the command below: moxa@MOXA:~# route Destination 192.168.5.0 192.168.4.0 192.168.3.0 192.168.30.0 192.168.8.0 Gateway 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 Genmsk 255.255.255.0 255.255.255.0 255.255.255.0 255.255.255.0 255.255.255.0 3-30 Flags U U U U U Metric 0 0 0 0 0 Ref 0 0 0 0 0 Use 0 0 0 0 0 Iface eth2 br0 eth0 eth3 br0