I'm facing an issue with OpenVPN on my OpenWrt router, and I need your help. My ISP blocks everything except a few sites like YouTube, Likee, and TikTok. I want to use OpenVPN with an HTTP proxy to bypass these restrictions. Here's my situation in detail:
Problem:
When I use the provided OpenVPN configuration on my mobile (OpenVPN client app) or PC, it connects successfully, and I can browse the internet freely.When connected to another ISP that has no restrictions, I can connect to OpenVPN on my openwrt router with the same configuration successfully. However, when I use the same configuration on my OpenWrt router on the isp which has restrictions, the connection fails. The logs show repeated errors related to HTTP proxy, as detailed below.
these http-proxy-option lines modify the HTTP headers that OpenVPN sends when using a proxy, likely helping you disguise the traffic as if it's for a specific website (like YouTube) to bypass restrictions or filtering because only youtube tiktok and likee is accessible from my wifi. and when connecting from mobile openvpn client it shows no errors with the same config .
my openvpn server ip is not accessible from my wifi only if i show that the traffic is from youtube then only my isp firewall will let it go to that ip otherwise not
this doesn't make any sense, if your traffic goes via the tunnel, it can't be blocked by your ISP, unless your clients still use the ISPs DNS, instead of sending the DNS requests through the tunnel.
first of all you have to make the tunnel but if your openvpn server is not accessible from your current network how would you make the tunnel brother ?
Not sure if this is related but compression is deprecated however it usually gives another error.
auth-user-pass needs a file with username and password or if you are using OpenVPN 2.6 you can use:
<auth-user-pass>
[USER NAME]
[PASSWORD]
</auth-user-pass>
i have removed http proxy sections but didnt connect to that server here is the logs
Mon Jan 20 15:53:26 2025 daemon.warn openvpn(test)[4901]: WARNING: Compression for receiving enabled. Compression has been used in the past to break encryption. Sent packets are not compressed unless "allow-compression yes" is also set.
Mon Jan 20 15:53:26 2025 daemon.notice openvpn(test)[4901]: Note: --cipher is not set. OpenVPN versions before 2.5 defaulted to BF-CBC as fallback when cipher negotiation failed in this case. If you need this fallback please add '--data-ciphers-fallback BF-CBC' to your configuration and/or add BF-CBC to --data-ciphers.
Mon Jan 20 15:53:26 2025 daemon.notice openvpn(test)[4901]: OpenVPN 2.6.12 aarch64-openwrt-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
Mon Jan 20 15:53:26 2025 daemon.notice openvpn(test)[4901]: library versions: OpenSSL 3.0.15 3 Sep 2024, LZO 2.10
Mon Jan 20 15:53:26 2025 daemon.warn openvpn(test)[4901]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Mon Jan 20 15:53:26 2025 daemon.notice openvpn(test)[4901]: LZ4 compression initializing
Mon Jan 20 15:53:26 2025 daemon.notice openvpn(test)[4901]: Control Channel MTU parms [ mss_fix:0 max_frag:0 tun_mtu:1250 tun_max_mtu:0 headroom:126 payload:1600 tailroom:126 ET:0 ]
Mon Jan 20 15:53:26 2025 daemon.notice openvpn(test)[4901]: Data Channel MTU parms [ mss_fix:0 max_frag:0 tun_mtu:1500 tun_max_mtu:1600 headroom:136 payload:1768 tailroom:562 ET:0 ]
Mon Jan 20 15:53:26 2025 daemon.notice openvpn(test)[4901]: TCP/UDP: Preserving recently used remote address: [AF_INET]178.128.209.238:33627
Mon Jan 20 15:53:26 2025 daemon.notice openvpn(test)[4901]: Socket Buffers: R=[131072->131072] S=[16384->16384]
Mon Jan 20 15:53:26 2025 daemon.notice openvpn(test)[4901]: Attempting to establish TCP connection with [AF_INET]178.128.209.238:33627
Mon Jan 20 15:53:26 2025 daemon.notice openvpn(test)[4901]: TCP connection established with [AF_INET]178.128.209.238:33627
Mon Jan 20 15:53:26 2025 daemon.notice openvpn(test)[4901]: TCPv4_CLIENT link local: (not bound)
Mon Jan 20 15:53:26 2025 daemon.notice openvpn(test)[4901]: TCPv4_CLIENT link remote: [AF_INET]178.128.209.238:33627
root@OpenWrt:~#