I'm trying to setup openvpn that is proxified to use a ssh tunnel. OpenVPN ports are blocked in some places that I visit but SSH is open. I have been able to proxify web browsing via ssh tunneling using the program proxifier but cannot seem to get openvpn to be proxified and then tunneled through ssh. The reason for this is that I need to tunnel UDP traffic, which normal ssh doesn't support. I can do this using proxified YourFreedom through ssh tunnelling, but i'd rather setup my own openvpn server.
I have tested the openvpn connection when I'm on my local network and that works, i.e. I can connect from my macbook to openvpn server when I'm on at home, behind NAT, without using socks proxy or ssh tunnelling.
Advance apologies, but I searched for "openvpn socks proxy" and didn't see anything.
Here's my home setup:
- ssh server is on linux os
- openvpn server is on windows os, different machine than ssh server
- both machines are behind a router that uses NAT
Here's my remote setup:
- openvpn client is tunnelblick on macos
- using proxifier program to proxify traffic
- ssh command is 'ssh -D <socks_port> <home_ssh_server>'
Server Config:
port 1194
proto udp
dev tun
ca "C:\\Program Files (x86)\\OpenVPN\\config\\ca.crt"
cert "C:\\Program Files (x86)\\OpenVPN\\config\\<server>.crt"
key "C:\\Program Files (x86)\\OpenVPN\\config\\<server>.key"
dh "C:\\Program Files (x86)\\OpenVPN\\config\\dh1024.pem"
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
keepalive 10 120
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 4
Client Config:
client
proto tcp
dev tun
# local ip of openvpn server on my home network
remote <local_nat_ip> 1194
nobind
ca ca.crt
cert <client>.crt
key <client>.key
ns-cert-type server
cipher BF-CBC
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
mute-replay-warnings
verb 4
mute 20
# i have tried commenting this out but does not work
socks-proxy 127.0.0.1 <socks_port>