How to Build an Unrestricted Network With RouterOS and OpenVPN

RouterOS is an incredibly powerful routing system. When paired with MikroTik hardware, it provides a cost-effective and eco-friendly way to implement routing, multiple uplinks, multiple wireless transceivers, BGP, OSPF, and many other advanced features. It can even be configured to connect to a specific VPN and use that VPN as the default route to bypass network barriers, with full support for OpenVPN. It truly offers enterprise-grade functionality at a consumer-friendly price. Given our high reliance on the latest tech news and resources, Sagittarius Technology also uses RouterOS as a critical component of our network environment. Our setup includes a wireless uplink (WiFi) and a dedicated leased line (wired). Downlink is connected to a Gigabit switch to achieve Gigabit communication within the internal network.

RouterOS is feature-rich, but its configuration complexity is equally high. First, let’s briefly cover the key points for configuring OpenVPN:
1. Drag the certificate file into the Files section of WinBox.
2. Import the certificate file you just created under System – Certificates.
3. Create an OpenVPN connection under the PPP section, using the imported certificate.
Please note carefully: RouterOS currently only supports OpenVPN servers using TCP without LZO compression.

Next is configuring the routing table. The approach might be counterintuitive to most people: set the default route to the OpenVPN gateway, but assign a higher Distance value (meaning a lower priority). Then, specifically set routes for IP addresses belonging to China to use the original default leased line gateway (of course, the IP of the OpenVPN server itself should also be set to a direct connection route). The reason for this is that while foreign IPs are not directly blocked, they are still affected by keyword filtering. Additionally, the number of Chinese IP address blocks is smaller and relatively easier to maintain.

Because the routing table is still quite large, use the command line /ip route to enter the console:
Then modify this file, changing GateWay=ether1 to the actual Interface name of the direct route. Paste all the content into the console.

After this, the entire network environment will be free of obstacles.  Of course, for commonly used sites like Wikipedia and MSDN, it is recommended to use mirror caching systems like Varnish to build internal mirrors on your local network, saving bandwidth.
 

銆怑ditor’s Picks銆?/strong>

  1. Excellent Soft Routing – RouterOS
  2. A Classic Case Study on RouterOS

Leave a Comment

Your email address will not be published.