rejetto forum

Running HFS Behind A VPN

MoTivE · 6 · 5213

0 Members and 1 Guest are viewing this topic.

Offline MoTivE

  • Occasional poster
  • *
    • Posts: 6
    • View Profile
Hi all,

Hope everyone is keeping well,

I wanted to know how I could access my HFS server if I have a VPN connected as it seems once I activate my vpn the external ip address that HFS then detects (from the vpn) does not actually connect to the server anymore ? why is this happening..  >:(

Is there way to get this working as it would be good to have as it would provide encryption while also hiding your real ip address publicly.

Thanks in advance!


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2063
    • View Profile
When you are connected to a VPN, your machine is no longer visible on your local network,

for hfs to be visible on the web again, the remote user would need to connect to the VPN provider's IP address and activate a port forwarded to your machine, this is a situation that does not seem to have a solution,

 the VPN should only affect your browser, other programs using your router directly


Offline MoTivE

  • Occasional poster
  • *
    • Posts: 6
    • View Profile
Ah ok thats a shame, well thank you for explaining anyway!


Offline danny

  • Tireless poster
  • ****
    • Posts: 281
    • View Profile
The problem is similar to Carrier Grade Nat (aka double-nat); so the work-arounds for that (such as pagekite) should also work for VPN. 


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2063
    • View Profile
Several situations can approach the solution

How to: Accessing Local Network Resources While Using VPN
https://community.spiceworks.com/how_to/113798-accessing-local-network-resources-while-using-vpn

https://windowsreport.com/vpn-split-tunneling-windows-10/

https://superuser.com/questions/166555/how-to-use-one-connection-to-the-internet-for-vpn-and-another-for-accessing-othe
Quote
Follow these steps to set up a VPN connection in Windows Vista that uses split tunneling:

    From the Control Panel, choose "Network & Internet."
    Click "View Network Status and Tasks."
    Click "Manage Network Connections."
    Right-click on your VPN connection and select "Properties."
    Select the "Networking" tab.
    Highlight "Internet Protocol Version 4 (TCP/IP v4)."
    Click "Properties."
    Click "Advanced."
    Uncheck the "Use default gateway on remote network" box.
    Click "OK" three times to close the windows you opened.

From that point forward, only traffic destined for your corporate network will be sent through the VPN. All other traffic will use the local network.

https://apple.stackexchange.com/questions/134766/using-vpn-and-wifi-at-the-same-time
Quote
In Network preferences, choose your primary interface, and hit Advanced.... For me, this was wi-fi, but the same thing should work for ethernet, etc. Whatever you normally use to connect to the internet

In the DNS tab (where you may already have entries), add the VPN DNS. Also make sure that your main DNS(s) are there. Then, add the VPN domain into the search domains box.

Example:

VPN settings http://elibaum.com/img/Screen%20Shot%202014-06-18%20at%2021.18.22.png

Here, 10.0.1.1 is my home wifi router, which in turn routes to my ISP's DNS servers. 10.8.1.22 is the local DNS server on the VPN.

So, if I request www.google.com, the request is sent to my router, whether or not I am on VPN.
However, if I request server while on the VPN, the primary DNS fails, and moves on to the next nameserver. However, since this nameserver (10.8.1.22 in my case) is on the VPN's subnet, traffic is automagically routed to the VPN. The search domain field example.com transforms server into server.example.com, and the DNS lookup succeeds.

Important Note: this workaround requires that your primary DNS fails on non-existent domains — that is, your ISP is not doing DNS hijacking. If they are, switch to OpenDNS, Google Public DNS, etc. Also see my related question: https://superuser.com/questions/766713/what-is-67-63-55-3 in which I sorted out DNS hijacking in relation to this problem.

Is this enough to allow hfs to be visible from the internet through the local router, that remains to be seen

it is possible to assign several ip to the network card of a PC, is one of them able to override the VPN, it remains to be tried


Offline patriciafoster

  • Occasional poster
  • *
    • Posts: 1
    • View Profile
Can you ping any other devices by hostname? It sounds like the DNS settings for your VPN are setup incorrectly, you need to set it up so that points to the local DNS server when connected.