Show pagesourceOld revisionsBacklinksBack to top × Table of Contents OpenConnect client Introduction Goals Instructions 1. Preparation 2. Firewall 3. Network Testing Troubleshooting OpenConnect client This article relies on the following: Accessing OpenWrt CLI Managing configurations Managing packages Managing services Introduction This how-to describes the method for setting up OpenConnect client on OpenWrt. Follow OpenConnect server for server setup and OpenConnect extras for additional tuning. Goals Encrypt your internet connection to enforce security and privacy. Prevent data leak and traffic 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. Instructions 1. Preparation Install the packages and specify the VPN client configuration parameters. Fetch server certificate hash. # Install packages opkg update opkg install openconnect # Configuration parameters OC_IF="vpn" OC_SERV="SERVER_NAME_OR_IP_ADDRESS" OC_PORT="4443" OC_HCERT="SERVER_CERT_HASH" OC_USER="USERNAME" OC_PASS="PASSWORD" 2. Firewall Consider VPN network as public and 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.network="${OC_IF}" uci add_list firewall.wan.network="${OC_IF}" uci commit firewall /etc/init.d/firewall restart 3. Network Set up VPN interface. # Configure network uci -q delete network.${OC_IF} uci set network.${OC_IF}="interface" uci set network.${OC_IF}.proto="openconnect" uci set network.${OC_IF}.server="${OC_SERV}" uci set network.${OC_IF}.port="${OC_PORT}" uci set network.${OC_IF}.serverhash="${OC_HCERT}" uci set network.${OC_IF}.username="${OC_USER}" uci set network.${OC_IF}.password="${OC_PASS}" uci commit network /etc/init.d/network restart Provide dynamic connection management if required. Testing Establish the VPN connection. Verify your client traffic is routed via VPN gateway. traceroute openwrt.org traceroute6 openwrt.org Check your client public IP addresses. https://ipleak.net/ Make sure there is no DNS leak on the client side. https://dnsleaktest.com/ Delegate a public IPv6 prefix to VPN6 network to use IPv6 by default. https://ipv6-test.com/ Troubleshooting Collect and analyze the following information. # Restart services /etc/init.d/log restart; /etc/init.d/network restart; sleep 10 # Log and status logread -e openconnect # Runtime configuration pgrep -f -a openconnect ip address show; ip route show table all ip rule show; ip -6 rule show; iptables-save; ip6tables-save # Persistent configuration uci show network; uci show firewall 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: 2020/11/30 15:46by vgaetera