Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
| docs:guide-user:services:vpn:openvpn:client [2019/04/04 03:43] – stylistics vgaetera | docs:guide-user:services:vpn:openvpn:client [2021/09/27 03:25] – [2. Firewall] vgaetera | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== OpenVPN | + | ====== OpenVPN |
| - | {{page> | + | {{section> |
| ===== Introduction ===== | ===== Introduction ===== | ||
| - | * This guide describes | + | * This how-to describes the method for setting up [[wp> |
| - | * You can use it to connect to your own OpenVPN server or a commercial OpenVPN provider. | + | * Follow [[docs: |
| - | * Follow [[basic|OpenVPN | + | |
| ===== Goals ===== | ===== Goals ===== | ||
| - | * Encrypt your internet connection to enforce security and privacy. | + | {{section> |
| - | * Prevent data leak and traffic spoofing on the path to client-ISP. | + | |
| - | * Escape client-ISP content-filters and internet censorship. | + | |
| - | * Access your VPN-server | + | |
| - | * Access region-restricted services and content using commercial VPN-providers. | + | |
| - | ===== Requirements | + | ===== Command-line instructions |
| - | * OpenWrt 18.06.1 | + | ==== 1. Preparation ==== |
| - | * OpenVPN | + | Install the required packages. |
| - | ===== Instructions ===== | + | <code bash> |
| - | + | # Install packages | |
| - | ==== 1. Network ==== | + | opkg update |
| - | Configure a VPN-routed [[docs: | + | opkg install openvpn-openssl |
| + | </ | ||
| ==== 2. Firewall ==== | ==== 2. Firewall ==== | ||
| - | To minimize firewall setup consider | + | Consider |
| + | Assign | ||
| <code bash> | <code bash> | ||
| # Configure firewall | # Configure firewall | ||
| - | uci set firewall.@zone[1].device=" | + | uci rename firewall.@zone[0]=" |
| + | uci rename | ||
| + | uci del_list firewall.wan.device=" | ||
| + | uci add_list firewall.wan.device=" | ||
| uci commit firewall | uci commit firewall | ||
| - | service | + | / |
| </ | </ | ||
| - | ==== 3. VPN-Service | + | ==== 3. VPN service |
| - | Save your client profile. | + | Save your client profile |
| - | Install and configure VPN-client. | + | |
| - | Drop VPN-service | + | |
| <code bash> | <code bash> | ||
| - | # Save VPN-client profile | + | # Save VPN client profile |
| - | cat << | + | umask go= |
| + | cat << EOF > / | ||
| COPY_PASTE_CLIENT_PROFILE_HERE | COPY_PASTE_CLIENT_PROFILE_HERE | ||
| EOF | EOF | ||
| - | + | /etc/init.d/openvpn restart | |
| - | # Fix permissions | + | |
| - | chmod " | + | |
| - | + | ||
| - | # Install packages | + | |
| - | opkg update | + | |
| - | opkg install openvpn-openssl | + | |
| - | + | ||
| - | # Configure VPN-client | + | |
| - | sed -i -e " | + | |
| - | /^user/ | + | |
| - | \$a user nobody | + | |
| - | / | + | |
| - | \$a group nogroup | + | |
| - | / | + | |
| - | \$a dev $(uci get firewall.@zone[1].device) | + | |
| - | " / | + | |
| - | service | + | |
| </ | </ | ||
| - | If using a commercial VPN-provider, | + | Configure |
| - | + | ||
| - | <code bash> | + | |
| - | # Save username/ | + | |
| - | cat << " | + | |
| - | YOUR_VPN_USERNAME | + | |
| - | YOUR_VPN_PASSWORD | + | |
| - | EOF | + | |
| - | + | ||
| - | # Fix permissions | + | |
| - | chmod " | + | |
| - | + | ||
| - | # Configure VPN-client | + | |
| - | sed -i -e " | + | |
| - | /^auth-user-pass/ | + | |
| - | \$a auth-user-pass / | + | |
| - | / | + | |
| - | \$a redirect-gateway def1 ipv6 | + | |
| - | " / | + | |
| - | service | + | |
| - | </ | + | |
| - | + | ||
| - | See also: [[extra#instance_management|Instance Management]] | + | |
| ===== Testing ===== | ===== Testing ===== | ||
| - | Follow: [[extra#testing|Testing]] | + | {{section> |
| ===== Troubleshooting ===== | ===== Troubleshooting ===== | ||
| - | Follow: [[extra# | + | {{section>docs:guide-user: |
| - | + | ||
| - | {{tag>How-To VPN OpenVPN}} | + | |