Using OpenVPN-CLIENT-1 as http-proxy for OpenVPN-CLIENT-2

nkp07
OpenVpn Newbie
Posts: 1
Joined: Sat Aug 12, 2017 9:26 am

Using OpenVPN-CLIENT-1 as http-proxy for OpenVPN-CLIENT-2

Postby nkp07 » Sat Aug 12, 2017 9:51 am

Tell me please, how to make a proxy server from an android phone to distribute 3G Internet.
If the ip-address of the phone in the 3G network supports the incoming connection, then there is no problem.
But I have situation when the ip-address behind NAT in 3G-network.

Here is scheme
[img]https://yadi.sk/i/nKfeQ3P13Lvhga[/img]


I think that this should look something like this: the program on the phone establishes a OpenVPN connection with the OpenVPN server.
The client accesses the proxy server on the phone through a VPN connection and connects to the Internet via a 3G network.



I have configuration - works well, but the traffic goes through
the OpenVPN server, and I need the Internet traffic from the client 2 to go through the client 1:

OpenVPN server (Windows) config:
--------------------------------
proto tcp-server
server 10.8.0.0 255.255.255.0
route-method exe
client-to-client
route-delay 10
cipher DES-CBC
port 443
dev tun
ca ca.crt
cert vpn-server.crt
key vpn-server.key
dh dh1024.pem
keepalive 10 20
comp-lzo
route 192.168.15.0 255.255.255.255.0
route 192.168.13.0 255.255.255.255.0
client-config-dir "C:\\Program Files\\OpenVPN\\config\\ccd"
ifconfig-pool-persist "C:\\Program Files\\OpenVPN\\config\\ipp.txt"
status "C:\\Program Files\\OpenVPN\\log\\status-vpn-server.log"
verb 3
persist-key
persist-tun
push "route 10.8.0.0 255.255.0.0"
push "redirect-gateway"
-------------------------
File ipp.txt
vpn-client-1,10.8.0.4
vpn-client-2,10.8.0.8

Files in ccd folder
# File vpn-client-1
# client 1 net 192.168.15.0
push "route 192.168.31.0 255.255.255.0"
push "route 192.168.13.0 255.255.255.0"
iroute 192.168.15.0 255.255.255.0
#disable

# File vpn-client-2
# client 2 net 192.168.13.0
push "route 192.168.31.0 255.255.255.0"
push "route 192.168.15.0 255.255.255.0"
iroute 192.168.13.0 255.255.255.0
#disable

File config for clients 1 (Android behind NAT) и 2(Windows behind NAT)
---------------------
client
proto tcp-client
remote [server ip] 443
route-method exe
cipher DES-CBC
dev tun
ca ca.crt
cert vpn-client-1.crt
key vpn-client-1.key
dh dh1024.pem
persist-key
persist-tun
resolv-retry infinite
keepalive 10 120
comp-lzo
verb 3
float
nobind

Return to “OpenVPN Connect (Android)”

Who is online

Users browsing this forum: No registered users and 3 guests