Description: Some versions of Raspbian (e.g., Bullseye) don't support installing the recommended OpenVPN3 client for Linux OS. Customers who want to use a Raspbian device as a Network Connector for CloudConnexa can use the community edition (open source) OpenVPN client (OpenVPN2) instead.
How to install and configure OpenVPN2 on Raspbian as a Network Connector
If your device or OS doesn't support OpenVPN3, install the community edition (open source) OpenVPN client, which is OpenVPN2. Here's how to do that and connect it to your CloudConnexa WPC.
Step 1: Install OpenVPN2
Example command to install the OpenVPN2 on Raspbian:
sudo apt install openvpn -y
Step 2: Verify the OpenVPN2 installation
Check the installed version of OpenVPN2 by running the below command:
sudo openvpn --version
Step 3: Download and transfer the Network Connector connection profile
- Sign in to your CloudConnexa Portal.
- Click Networks > Networks.
- Click the name of the desired Network.
- Click the Connectors tab for the Network.
- Click the Deploy drop-down.
- Click Download Porfile in .ovpn format.
- Transfer the downloaded .ovpn connection profile to your Raspbian device using an SCP program such as WinSCP.
Step 4: Enable IP Forwarding
Run the following commands to enable IP forwarding:
echo 'net.ipv4.ip_forward=1' | sudo tee -a /etc/sysctl.conf
echo 'net.ipv6.conf.all.forwarding=1' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
Step 5: Configure NAT
Run the following commands to set up NAT:
IF=$(ip route | grep -m 1 default | awk '{print $5}')
sudo iptables -t nat -A POSTROUTING -o $IF -j MASQUERADE
sudo ip6tables -t nat -A POSTROUTING -o $IF -j MASQUERADE
sudo DEBIAN_FRONTEND=noninteractive apt install -y iptables-persistent
Step 6: Configure OpenVPN2 to start automatically on boot
- Transfer the .ovpn connection profile to the path
/etc/openvpn/client
and rename it to a client.conf filename:
sudo cp connector01_singapore.ovpn /etc/openvpn/client/client.conf
- Enable the OpenVPN2 service to run on boot:
sudo systemctl enable openvpn-client@client.service
- Restart the OpenVPN2 client service:
sudo systemctl restart openvpn-client@client.service
Conclusion
Your Raspbian device should now automatically connect to CloudConnexa as a Network Connector using OpenVPN2 upon boot.
If you have any more questions, please submit a support ticket.
Comments
0 comments
Please sign in to leave a comment.