App_Guide_OpenVPN_UserPassword Mode

Application Guide for Easy OpenVPN via IR700 ------User Password Mode, IR700 as Client/Server   1. Summary This guide will show you how to configure IR700 Cellular Router as both OpenVPN Server and Client.
http://www.m2mlib.com/uploads/article/20171103/fb8c5285fc7100d46d348763728fba04.jpg
We are using user/password mode here. Any questions please contact us: support@inhandnetworks.com   Attention: 1) This application is suit for customers with small monitor center and small amount of usage, IR700 here used as server can support LESS THAN 10 points, if you have large amount, we suggest you to use large Linux OpenVPN Server and faster cable access for monitor center; 2) Before using VPN, please make sure both IR700 and remote PC can access to internet; 3) IR700 must be the following models: IR791WH01, IR791GSxx, IR794WH01, IR791UE, IR794UE.   2. Configure IR700 as OpenVPN Server Attention: 1) Before using VPN, please make sure both IR700 can access to internet; 2) For OpenVPN Server, IR700 must be with fixed IP or dynamic public IP with DDNS; 1. Configure LAN address After entering configure web, click “Network”????”LAN”, make sure IR700 and the application server are in the right subnet: 192.168.123.0/24, here we use: IR700: 192.168.123.250/24:
http://www.m2mlib.com/uploads/article/20171103/bd96389435ceab2ae94e0de7d7b10d60.jpg
Application Server: 192.168.123.123/24. 2. Insert CA Attention: You should insert all three CAs before click “Apply button”. Click “VPN”???? “Certificate Management”:
http://www.m2mlib.com/uploads/article/20171103/2608600cf496d14942a6ce9c2561c168.png
Click the “Browse” button at the left side of “Import CA Certificate” and then choose the right “root certificate” (e.g.: ca. crt), then click “Import CA Certificate” button, and you will see:
http://www.m2mlib.com/uploads/article/20171103/64c647a49c21a237712947c6be7b8aae.png
3. Configure OpenVPN Advanced Options Click “VPN”????”OpenVPN Advanced”, configure as below: Enable Client-to-Client (Server Mode Only), and click “Add” to add this tunnel setting:
http://www.m2mlib.com/uploads/article/20171103/c07a9efac28700a6463929e49b637e21.jpg
And then click “Apply”. Notice: The “Local Static Route” is a route added in the server to tell itself what the subnet of OpenVPN Client is. The “Remote Static Route” is a route pushed to the OpenVPN client to tell what’ the server’s subnet. If you have one more subnet, please divide routes using “,”, e.g.: 192.168.220.0/24, 192.168.221.0/24. 4. Add OpenVPN Tunnel Click “VPN”????”OpenVPN Tunnels”:
http://www.m2mlib.com/uploads/article/20171103/9c9cfb1583b6d672302117d390c99b46.png
Configure as below:
http://www.m2mlib.com/uploads/article/20171103/c5536e04191091cee6931db69cace82b.jpg
http://www.m2mlib.com/uploads/article/20171103/982dbc5e505d39dc421d9625cb0e3c48.jpg
Then click “Save”, after a few seconds, you will see:
http://www.m2mlib.com/uploads/article/20171103/aff38430e2ed36f50d4d0aaf33b25a43.jpg
The server is now created successfully! 3. Configure another IR700 as OpenVPN Client Attention: 1) Before using VPN, please make sure both IR700 can access to internet; 2) For OpenVPN client, IR700 can access to internet via any cellular or wired form; 1. Configure LAN address After entering configure web, click “Network”????”LAN”, make sure IR700 and the PC are in the right subnet: 192.168.220.0/24, here we use: IR700: 192.168.220.1/24:
http://www.m2mlib.com/uploads/article/20171103/0b6f026faeaae45d9cdb948a37df0a21.jpg
PC: 192.168.220.10/24. 2. Insert CA Attention: You should insert the root CA (e.g.: ca.crt) before click “Apply button”. Click “VPN”???? “Certificate Management”:
http://www.m2mlib.com/uploads/article/20171103/7280c05881c0f3fda5b4cf1142dda55b.png
Click the “Browse” button at the left side of “Import CA Certificate” and then choose the right “root certificate” (e.g.: ca. crt), then click “Import CA Certificate” button, and you will see:
http://www.m2mlib.com/uploads/article/20171103/77f5bece047063502f791a582d7b012b.jpg
Click “Back” button and return to the former page. Then remember to click “Apply” button. 3. Add OpenVPN Tunnel Click “VPN”????”OpenVPN Tunnels”:
http://www.m2mlib.com/uploads/article/20171103/a8a3fef9c534e19158cd5150f9c5e2b2.jpg
Then click “Add” to add a new tunnel:
http://www.m2mlib.com/uploads/article/20171103/a902602f7226c220df8f879743b166d5.jpg
Configure as below:
http://www.m2mlib.com/uploads/article/20171103/9bada9be70566e247e0b6ab72d323023.jpg
http://www.m2mlib.com/uploads/article/20171103/8d76f9b8802588d623d0fe77b88dd605.jpg
Attention: if you are using DDNS at the server side, you should configure DDN in the client IR700: Click “Network”????”DNS”, configure as below and then click “Apply”:
http://www.m2mlib.com/uploads/article/20171103/c619a2bc8e851ea1f6b958e0130d1bdd.png
(The DNS: 8.8.8.8 and 8.8.4.4 is Google’s and available across global) Then click “Save”, after a few seconds, you will see the tunnel created:
http://www.m2mlib.com/uploads/article/20171103/751f6bfebe269bb4ef951f1bf798a8a2.jpg
The server is now created successfully! And at the client side, you can easily get access to the server subnet:
http://www.m2mlib.com/uploads/article/20171103/e9dc4db8d2267581f9c99c24fc7017f8.jpg
Official OpenVPN client software is also supported (please see http://openvpn.net/ for the latest release). The next chapter (Advanced Configuration) will show you how to realize. 4. Advanced Configuration One of the practical utility for OpenVPN is that the server can create tunnels with different clients:
http://www.m2mlib.com/uploads/article/20171103/f2cb0cf7d73657b5f5d9cb29e220c236.jpg
At the former steps, we have already configured one tunnel, here we add another. If you need add more, you can use similar method. 1. Entering the server’s web, click “VPN”????”OpenVPN Advanced” and change the settings as below:
http://www.m2mlib.com/uploads/article/20171103/d21f472368b2403a0ab721e3e166fe69.jpg
The “Remote Static Route” will tell your pc what the subnets of both client IR700 and server IR700 are. Then click “Apply”. The OpenVPN service will restart. Meanwhile, the clients will loss the old OpenVPN connection and then restart to connect to the new server automatically. 2. Configure PC using OpenVPN client software Here we provide a configure file, please put this .ovpn file and ca.crt in the directory: /OpenVPN/config ############################################## # Sample client-side OpenVPN 2.0 config file # # for connecting to multi-client server. # # # # This configuration can be used by multiple # # clients, however each client should have # # its own cert and key files. # # # # On Windows, you might want to rename this # # file so it has a .ovpn extension # ############################################## # Specify that we are a client and that we # will be pulling certain config file directives # from the server. client # Use the same setting as you are using on # the server. # On most systems, the VPN will not function # unless you partially or fully disable # the firewall for the TUN/TAP interface. ;dev tap dev tun # Windows needs the TAP-Win32 adapter name # from the Network Connections panel # if you have more than one. On XP SP2, # you may need to disable the firewall # for the TAP adapter. ;dev-node MyTap # Are we connecting to a TCP or # UDP server? Use the same setting as # on the server. proto tcp ;proto udp # The hostname/IP and port of the server. # You can have multiple remote entries # to load balance between the servers. ;remote digidata.dynalias.com 1194 remote 203.86.63.237 1194 # Choose a random host from the remote # list for load-balancing. Otherwise # try hosts in the order specified. ;remote-random # Keep trying indefinitely to resolve the # host name of the OpenVPN server. Very useful # on machines which are not permanently connected # to the internet such as laptops. resolv-retry infinite # Most clients don't need to bind to # a specific local port number. nobind # Downgrade privileges after initialization (non-Windows only) ;user nobody ;group nobody # Try to preserve some state across restarts. persist-key persist-tun # If you are connecting through an # HTTP proxy to reach the actual OpenVPN # server, put the proxy server/IP and # port number here. See the man page # if your proxy server requires # authentication. ;http-proxy-retry # retry on connection failures ;http-proxy [proxy server] [proxy port #] # Wireless networks often produce a lot # of duplicate packets. Set this flag # to silence duplicate packet warnings. ;mute-replay-warnings # SSL/TLS parms. # See the server config file for more # description. It's best to use # a separate .crt/.key file pair # for each client. A single ca # file can be used for all clients. ca ca.crt ;cert pub.crt ;key pri.key # Verify server certificate by checking # that the certicate has the nsCertType # field set to "server". This is an # important precaution to protect against # a potential attack discussed here: # http://openvpn.net/howto.html#mitm # # To use this feature, you will need to generate # your server certificates with the nsCertType # field set to "server". The build-key-server # script in the easy-rsa folder will do this. ;ns-cert-type server auth-user-pass # If a tls-auth key is used on the server # then every client must also have the key. ;tls-auth ta.key 1 # Select a cryptographic cipher. # If the cipher option is used on the server # then you must also specify it here. ;cipher x # Enable compression on the VPN link. # Don't enable this unless it is also # enabled in the server config file. comp-lzo # Set log file verbosity. verb 3 # Silence repeating messages ;mute 20 Then the VPN is successfully created:
http://www.m2mlib.com/uploads/article/20171103/20de8676aed4bfb5e7d2a38d7d4781e9.jpg
You can also access to the remote site IR700 client.

0 个评论

要回复文章请先登录注册