Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
docs:guide-user:services:vpn:openvpn:client [2021/04/07 21:20] – [3. VPN service] allow shell variable/command expansion vgaeteradocs:guide-user:services:vpn:openvpn:client [2021/09/27 03:25] – [2. Firewall] vgaetera
Line 9: Line 9:
 {{section>docs:guide-user:services:vpn:wireguard:server#goals&noheader&nofooter&noeditbutton}} {{section>docs:guide-user:services:vpn:wireguard:server#goals&noheader&nofooter&noeditbutton}}
  
-===== Command-line interface =====+===== Command-line instructions =====
 ==== 1. Preparation ==== ==== 1. Preparation ====
-Install the packages and specify the VPN client configuration parameters.+Install the required packages.
  
 <code bash> <code bash>
Line 17: Line 17:
 opkg update opkg update
 opkg install openvpn-openssl opkg install openvpn-openssl
- 
-# Configuration parameters 
-OVPN_DIR="/etc/openvpn" 
-OVPN_ID="client" 
 </code> </code>
  
 ==== 2. Firewall ==== ==== 2. Firewall ====
-Consider VPN network as public and assign VPN interface to WAN zone to minimize firewall setup.+Consider VPN network as public
 +Assign VPN interface to WAN zone to minimize firewall setup.
  
 <code bash> <code bash>
Line 37: Line 34:
  
 ==== 3. VPN service ==== ==== 3. VPN service ====
-Save your client profile and configure VPN service dropping its privileges.+Save your client profile to configure VPN service.
  
 <code bash> <code bash>
 # Save VPN client profile # Save VPN client profile
 umask go= umask go=
-cat << EOF > ${OVPN_DIR}/${OVPN_ID}.conf+cat << EOF > /etc/openvpn/client.conf
 COPY_PASTE_CLIENT_PROFILE_HERE COPY_PASTE_CLIENT_PROFILE_HERE
 EOF EOF
- 
-# Configure VPN service 
-sed -i -e " 
-/^user/s/^/#/ 
-\$a user nobody 
-/^group/s/^/#/ 
-\$a group nogroup 
-" ${OVPN_DIR}/${OVPN_ID}.conf 
 /etc/init.d/openvpn restart /etc/init.d/openvpn restart
 </code> </code>
  • Last modified: 2023/10/14 05:16
  • by vgaetera