Show pagesourceOld revisionsBacklinksBack to top × Table of Contents OpenVPN client Introduction Goals Command-line instructions 1. Preparation 2. Firewall 3. VPN service Testing Troubleshooting OpenVPN client This article relies on the following: Accessing web interface / command-line interface Managing configs / packages / services / logs Introduction This how-to describes the method for setting up OpenVPN client on OpenWrt. Follow OpenVPN server for server setup and OpenVPN extras for additional tuning. Goals Encrypt your internet connection to enforce security and privacy. Prevent traffic leaks and spoofing on the client side. Bypass regional restrictions using commercial providers. Escape client side content filters and internet censorship. Access your LAN services remotely without port forwarding. Command-line instructions 1. Preparation Install the required packages. # Install packages opkg update opkg install openvpn-openssl 2. Firewall Consider VPN network as public. Assign VPN interface to WAN zone to minimize firewall setup. # Configure firewall uci rename firewall.@zone[0]="lan" uci rename firewall.@zone[1]="wan" uci del_list firewall.wan.device="tun+" uci add_list firewall.wan.device="tun+" uci commit firewall service firewall restart 3. VPN service Save your client profile to configure VPN service. # Save VPN client profile umask go= cat << EOF > /etc/openvpn/client.conf COPY_PASTE_CLIENT_PROFILE_HERE EOF service openvpn restart Specify credentials for commercial provider and configure dynamic connection if necessary. Testing Establish the VPN connection. Verify your routing with traceroute and traceroute6. traceroute openwrt.org traceroute6 openwrt.org Check your IP and DNS provider. ipleak.net dnsleaktest.com Troubleshooting Collect and analyze the following information. # Restart services service log restart; service openvpn restart; sleep 10 # Log and status logread -e openvpn; netstat -l -n -p | grep -e openvpn # Runtime configuration pgrep -f -a openvpn ip address show; ip route show table all ip rule show; ip -6 rule show; nft list ruleset # Persistent configuration uci show network; uci show firewall; uci show openvpn head -v -n -0 /etc/openvpn/*.conf This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.OKMore information about cookies Last modified: 2023/10/14 01:16by vgaetera