Changes

1,146 bytes added ,  16:30, 14 June 2018
no edit summary
Line 86: Line 86:  
</ul>
 
</ul>
 
----
 
----
* Finally, we'll need to add a short custom script to ''/etc/hotplug.d/iface/55-vpn'' that adds a route that
+
* Finally, we'll need to add a short custom script to ''/etc/hotplug.d/iface/55-vpn'' that adds a route which makes the specified LAN range reach the Internet via the OpenVPN server:
    
  echo '[ "$ACTION" = "ifup" ] && { ip route add default via 10.0.0.1 table rt }' > /etc/hotplug.d/iface/55-vpn
 
  echo '[ "$ACTION" = "ifup" ] && { ip route add default via 10.0.0.1 table rt }' > /etc/hotplug.d/iface/55-vpn
 +
 +
==Testing the setup==
 +
 +
If you've followed the steps presented above, your configuration should be finished. But as with any other configuration, it is always wise to test the setup in order to make sure that it works properly. In order to test this particular configuration, a few steps have to be taken:
 +
 +
* Check whether devices with IPs from different ranges reach the Internet through the default gateway. If you only have one device at your disposal at the time, you can configure a static IP address (guide for Linux users '''[[Setting up a Static IP address on a Ubuntu 16.04 PC|here]]'''; for Windows '''[[Setting up a Static IP address on a Windows 10 PC|here]]''') for that device in one range and later in the other. According to our configuration, if a device's IP falls in the range of 192.168.1.1 - 192.168.1.127, its Public IP should be that of the router's; if the IP falls in the range of 192.168.1.128 - 192.168.1.254, its Public IP should be that of the OpenVPN server. You can check the Public IP address in '''[http://www.whatsmyip.org/ this website].

Navigation menu