How to route internet connection through teamviewer's VPN?

26

19

I'm trying to VPN to my home computer using teamviewer.

i can connect successfully and can easily see the shared files/folders. But I also want my internet to go through this vpn connection so that I have access to my home's internet connection.

Does anyone know how to do this in Windows 7 ?

Thanks in advance...

Hamid

Posted 2012-03-18T22:55:35.343

Reputation: 293

Answers

13

Basically you need a solution to router the internet requests from your current computer (ouside your network), through your VPN and to your local network (and its internet access).

Using Teamviewer's VPN, you only get a direct connection between your current computer and the computer running Teamviewer (or a "private" network between them I could say). So, I believe you don't actually have access to your local network.

The only way you could have access to the internet on your network is through a proxy. The computer, inside your network, would receive requests over Teamviewer's VPN network and act as a proxy to your local network.

Here is how I accomplished that:

On the computer inside your network:

  1. Download and install a proxy server on your computer running Teamviewer server, inside your network. I suggest using Squid.
  2. Set up your proxy server and make sure it will accept all incoming requests, including from the Teamviewer VPN network (not a local network). I just gave access to "all" in "/etc/squid.conf" in the proper configuration parameters (please refer to the proper documentation).
  3. Initialize the proxy.
  4. Make sure Teamviewer is running as a service and that VPN connection is enabled.

On the computer outside your network

  1. Make sure you are connected through the Teamviewer VPN connection
  2. Go to your web browser proxy settings and set parameters same as below
  3. Surf the web using your private network's internet access.

proxy server: hosname or IP (you can used the IP address given by Teamviewer, but hostname is best)
connection port: 3128 (Squid's default port)

Use the same server for all protocols

PS.: You can setup a proxy server for the whole computer, using Internet Settings (IExplorer and Chrome), but Mozilla Firefox supports a "private" configuration, allowing you to surf the web via proxy only inside Firefox.

Jonas

Posted 2012-03-18T22:55:35.343

Reputation: 423

Squid is not available for windows anymore – LifeH2O – 2014-07-01T11:59:50.227

What about just sharing yout Ethernet connection with the VPN virtual adapter? – skan – 2016-04-25T17:19:57.790

@LifH1O Still available squid.diladele.com – skan – 2016-04-28T10:16:19.000

any of this works with a linux client of TeamViewer? – nhed – 2017-07-27T01:58:30.497

2

excellent answer! it's working thx! :D Much easier is to use "Network Redirector - Mini Proxy" less then 2MB single file without configuring. http://redirproxy.bplaced.net/

– oobe – 2013-03-08T11:45:15.277

Does Redirproxy run as a Windows Service? – Jonas – 2013-03-08T18:15:03.507

FreeProxy Internet Suite is also an easy and good option. It runs as a service and has a nice user interface. Just don't forget about the firewall. – Jonas – 2013-12-02T17:36:11.137

0

At first I thought you got things mixed up. I found out that there is a separate "teamviewer VPN" module, but I don't know how to troubleshoot that. Normally Teamviewer makes it possible to view and use someone elses desktop (sends video/audio output and mouse/keyboard input). A VPN is a tunnel from one network to another.

On your remote location you would install a VPN client which connects to the VPN server on your home computer. Your homecomputer would appear just another computer in your LAN, and by doing this you evade prying eyes and firewall rules. It is only a connection.

If you want to send files to another computer you have to configure another protocol to do so (for example standard windows printer/file sharing). If you want to use it as some kind of anonymizing proxy you should make sure your traffic is routed correctly.

In either case first make sure you really can ping the other computer through the VPN (ping the internal IP of your homepc from the remote location). Most of the times firewalls on routers/modems are causing problems. Are you using Windows 7 on both locations? Can you reach an external site through your homepc? Try tracepath/traceroute/tracert the external site. Did you configure routing? If not you it could be as easy as opening the Network Connections window, select both connections while holding Ctrl and click Bridge Connections.

xatr0z

Posted 2012-03-18T22:55:35.343

Reputation: 609

I'm using windows 7 on both computers. and I can definitely ping my homepc from my remote pc. do I have to configure routing on my homepc or the remote pc? thanks... – Hamid – 2012-03-19T01:00:11.447

The VPN server, so in your case your home pc. Configure by selecting both network adapters and click 'Bridge Connections'. – xatr0z – 2012-03-19T01:29:08.363

ok, so when I bridge both network adapters, I get disconnected from the internet !!!! I'm using a wireless router to connect to the internet. after the bridge, my homepc is still connected to the wireless router but with no internet... I even tried manually setting the dns server settings and the default gateway to the routers settings, but that didn't work either! – Hamid – 2012-03-19T01:48:54.567