That's my problem.
I have access to the internet through a wifi connection (Host 1 - 192.168.1.101) in my private network 192.168.1.0/24.
The router has an LAN interface 192.168.1.1 and a WAN interface 187.xx.xx.xx.
In this same network there is a host 2 (192.168.1.100) that is running an openvpn server with address 10.4.0.1. This server is in a Windows 7 with redirect-gateway. The forwarding in windows is already perfectly running.
I'd like to start a download from the internet on host 1 and during the download, establish a tunnel to the server and go on the download via tunnel.
The host 1's active connection must be transfered to the tunnel.
Is it possible ?
I need this a lot. Any help ?
Thanks.
Redirect active connections to a OpenVPn tunnel
Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech
-
- OpenVpn Newbie
- Posts: 3
- Joined: Thu Oct 27, 2011 9:34 pm
- janjust
- Forum Team
- Posts: 2703
- Joined: Fri Aug 20, 2010 2:57 pm
- Location: Amsterdam
- Contact:
Re: Redirect active connections to a OpenVPn tunnel
it's not possible to transfer an existing active connection from one connection to another. This has nothing to do with VPNs but with basic TCP/IP networking:
All network connections are based on SRC IP + SRC Port talking to DEST IP + DEST Port
If you change the SRC IP and/or SRC Port then it's a new connection. Unless your download software can do an automatic reconnect you're out of luck
All network connections are based on SRC IP + SRC Port talking to DEST IP + DEST Port
If you change the SRC IP and/or SRC Port then it's a new connection. Unless your download software can do an automatic reconnect you're out of luck
-
- OpenVpn Newbie
- Posts: 3
- Joined: Thu Oct 27, 2011 9:34 pm
Re: Redirect active connections to a OpenVPn tunnel
Now a have a new network configuration.
Internet ---------[1] Notebook1 [2]-------[3] Wifi Router [3]----- [4] Cel Android
[1] = cabled real IP
[2] = 192.168.1.1
[3] = 192.168.1.2
[4] = 192.168.1.3
I'd like to establish a tunnel between Android and the real IP of notebook 1, so when Android go to 3G network all traffic arriving in notebook 1 from the internet to 192.168.1.3 (Android) must be forwarded to the Android address in tunnel.
In tunnel notebook 1 has address 10.3.0.1 and Android 10.3.0.2
I tried to use route 192.168.1.3 255.255.255.255 10.3.0.2 in configuration openvpn file in notebook 1.
But when this route is added to routing table I can't get a ping response from Android.
Notebook 1 runs Windows 7
Could this be a limitation of Windows 7 ?
Internet ---------[1] Notebook1 [2]-------[3] Wifi Router [3]----- [4] Cel Android
[1] = cabled real IP
[2] = 192.168.1.1
[3] = 192.168.1.2
[4] = 192.168.1.3
I'd like to establish a tunnel between Android and the real IP of notebook 1, so when Android go to 3G network all traffic arriving in notebook 1 from the internet to 192.168.1.3 (Android) must be forwarded to the Android address in tunnel.
In tunnel notebook 1 has address 10.3.0.1 and Android 10.3.0.2
I tried to use route 192.168.1.3 255.255.255.255 10.3.0.2 in configuration openvpn file in notebook 1.
But when this route is added to routing table I can't get a ping response from Android.
Notebook 1 runs Windows 7
Could this be a limitation of Windows 7 ?
- Mimiko
- Forum Team
- Posts: 1564
- Joined: Wed Sep 22, 2010 3:18 am
Re: Redirect active connections to a OpenVPn tunnel
You can't do this, because all trafic from internet will arrive to you public IP, not the unrouted on real internet IP 192.168.1.3. Private ip ranges a dropped on the internet switches.I'd like to establish a tunnel between Android and the real IP of notebook 1, so when Android go to 3G network all traffic arriving in notebook 1 from the internet to 192.168.1.3 (Android) must be forwarded to the Android address in tunnel.
You have to use a more complex software and de-packet all packets till the very first packet wich may hold the source IP of 192.168.1.3. See the IP standart.