By default, the VPN certificate configuration only allows access to machines on the private subnet (192.168.125.X). If your scenario includes VMs on additional subnets, you must update the VPN configuration file to include those networks.
Steps to Add Additional Subnets:
- Download the OVPN configuration file.
- Open the OVPN file in a text editor.
- Locate the section where routes are defined.
- Add a new line for each subnet you need to access using the following format:
route <subnet> <subnet_mask> For example, if we need to access machines in the 10.10.10.0/24 subnet, we add the following line on the VPN file
route 10.10.10.0 255.255.255.0 Below are the first lines of the VPN file with the line added:
client
proto tcp
remote vpn.cyberranges.com
port 1192
#cipher BF-CBC
providers legacy default
data-ciphers AES-256-GCM:AES-128-GCM:BF-CBC
dev tun
nobind
script-security 2
dhcp-option DNS 192.168.125.254
route 10.10.10.0 255.255.255.0
dhcp-option DNS 8.8.8.8
# up /etc/openvpn/update-resolv-conf
# down /etc/openvpn/update-resolv-conf
remote-cert-tls server
#ns-cert-type serverWith the above, you can be able to connect to any machine in the 10.10.10.0/24 subnet. This needs to be replicated for all the other subnets on the cloud template.