0

I have clients all over the world that will occasionally need software/firmware updates to the hardware I have provided them. They have no IT staff or networking know-how, and I'm 10 years out from my last networking class, so I'm rusty but not incompetent.

A typical setup will be me sitting in my office with my laptop, and the client's laptop connected physically to the device with an ethernet cable and to the internet with wifi.

What I'm trying to achieve is to connect to their laptop through a vpn service like hamachi or teamviewer's vpn driver, and then bridge the vpn in such a way that I can access the device from my office as if I was connected to it directly.

Some more specific details

My computer:

  • wifi : 192.168.0.xxx, mask 255.255.255.0
  • teamviewer vpn : 7.xxx.xxx.xxx, mask 255.0.0.0

Their computer:

  • wifi : any possible configuration, but typically the same as mine
  • teamviewer vpn : same as mine
  • ethernet : 192.168.178.10, mask 255.255.255.0

The devices at their location

  • each device is on the same 192.168.178.xxx subnet on an ethernet switch, with static IPs ranging from 001 to 005

What I need: - I should be able to type "ping 192.168.178.2" from my end and get the device from their end

What I've tried:

  • used the "route" command to add a route from 192.168.178.2 to their vpn ip
  • used the windows bridge connection tool to bridge the ethernet on their end with the teamviewer virtual adapter. Then tried to set the bridges IP to either the ethernet's IP or teamviewer's IP. Couldn't get it to work, but I feel like I'm just missing some understanding of how to configure this properly

What I have available: I can remote desktop into their machine to change settings and install some software

What I don't: I can't ship them anything or have them install/buy any hardware, this has to be a software only solution

Thank you in advance for your response

EDIT: In my test setup, by enabling IP routing and using wireshark to monitor the ethernet port leading to the device, if I attempt to ping across the vpn I can see the packet get through to the device, but its reply of a Who-is ARP broadcast is never responded to.

0

I've solved this, so I'm going to post my solution here for posterity, and because one of my biggest pet peeves is finding my exact problem on a forum, only to find it in a closed thread with the last post being either "figured it out", or "PM'd you the answer"

Anyway, the issue here is out-of-the-box vpn solutions like teamviewer or hamachi aren't really configurable and are designed to create a private network, not a bridge. However, they do allow you to create this private network without the requirements of setting up and maintaining a proper vpn server, punching through firewalls and forwarding ports, so they have their uses, including in solving this problem.

In a nutshell, this is how I achieved my goal as painlessly for myself and the customer as possible: I piggybacked a vpn bridge onto the vpn connection provided by teamviewer.

Here are the steps:

  1. Get the client to install teamviewer on the computer they have connected to the device network.
  2. Remote into their machine through teamviewer, and install teamviewer's vpn driver as well as a copy of OpenVPN, which will handle the actual bridging
  3. Once OpenVPN is installed, there should be a TAP Adapter in the network adapter list, select it and rename it tap-bridge, and then bridge it with the Ethernet connection to the device network. (In windows, select both adapters and select bridge from the context menu)
  4. In the IPv4 settings of the new bridge, manually set the IP to something on the device's subnet. Ping the device to be sure you still have connectivity
  5. Rightclick the openvpn gui on the taskbar and open the config and put something like this in it

    dev tap
    dev-node tap-bridge
    secret static.key
    comp-lzo
    keepalive 10 60
    ping-timer-rem
    persist-key
    
  6. The static.key file should be the same on both machines (copy it from one to the other) and can be generated through the command line like this

    openvpn --genkey --secret static.key
    
  7. Back on your own computer, also install OpenVpn.
  8. Find its TAP adapter, and manually give it an IP on that same subnet
  9. IF you're not connected to the other computer with Teamviewer's vpn, do it now. A window will open once the connection is made, showing you the other computer's IP
  10. Put this in your OpenVPN config file on your machine

    remote 7.111.222.333
    dev tap
    secret static.key
    comp-lzo
    keepalive 10 60
    ping-timer-rem
    persist-key
    

    (replace the ip after "remote" with the IP you just got in step 9)

  11. Now if you open OpenVPN's gui on both machines and connect, they should establish a VPN bridge INSIDE teamviewer's vpn, and you should be able to see all the devices on that subnet as if they were connected to your local machine

Its advisable to revert your changes to their network adapters and uninstall openvpn after you're done, but you do you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.