How to access a remote PC from a local device through the a VPN on another local PC?

2

I just wanna know how to access [C] from [B] given the following diagram?

    ┌─────────────────────────┐                ┌───────────────────────┐
    │       HOME LAN          │      ┌────────>│      OFFICE LAN       │
    ├─────────────────────────┤      │         ├───────────────────────┤
    │                         │      │         │                       │
    │    ┌───────────────┐    │      │         │  ┌─────────────────┐  │
    │    │ A ─ PC / IP_A │    │      │         │  │  C ─ PC / IP_C  │  │
    │    ├───────────────┤    │      │         │  └─────────────────┘  │
    │    │     VPN       ├────┼──────┘         │                       │
    │    │  Connection   │    │                │  ┌─────────────────┐  │
    │    └───────────────┘    │                │  │  D ─ PC / IP_D  │  │
    │                         │                │  └─────────────────┘  │
    │  ┌───────────────────┐  │                │                       │
    │  │ B ─ MOBILE / IP_B │  │                │  ┌─────────────────┐  │
    │  └───────────────────┘  │                │  │  E ─ PC / IP_E  │  │
    │                         │                │  └─────────────────┘  │
    └─────────────────────────┘                │                       │
                                               └───────────────────────┘

For me is not possible to make configurations on the router of any of both LANs.

I can successfully ping to [IP_C] from [A] where I use Windows 10.

In case there is no way to configure things to ping [IP_C] from [B] directly, is there any way to configure things for example, creating another IP inside [A], like: [IP_F], so when I do whatever request to [IP_F] that traffic be redirected to [IP_C]?

That way I could access [C] from [B] via [IP_F].

Thanks.

davidesp

Posted 2018-04-07T03:01:05.597

Reputation: 121

1Wonder if you could enable IP Forwarding / IP Routing from PC-A and then use PC-A as the default gateway for Mobile-B and when PC-A is connected to the VPN if that would then forward packets it forwards across the VPN tunnel as expected? If you can work it out, that's an idea but you'd have to work out all the details, etc. as I don't have that information right now nor do I understand what OS your IP-A machine is so that may be different for IP forward for Windows vs Linux for example. – Pimp Juice IT – 2018-04-07T04:30:46.163

I use Windows 10 on [A-PC]. Also, I don't know if I could do special configurations on [B-Mobile]. I would prefer not to modify [B-Mobile]. – davidesp – 2018-04-07T04:33:19.653

You might look over this post: http://keepthetech.com/2016/01/enable-ip-routing-on-windows10.html and then you might need to setup IP routes on the PC-A to send packets back to Mobile-B's IP address (see here for example: https://superuser.com/questions/1260326/routing-between-two/1260655#1260655) but use that and my first comment suggestion as a starting point if that's something you want to try at least. Be sure to note what you change so you can undo those changes if it does not resolve though.

– Pimp Juice IT – 2018-04-07T04:41:13.003

Answers

0

If I understand correctly, your office provides you with access to their local network over a VPN. If this is true, then you can use a VPN app on your phone to load the configuration file for your office VPN ( like OpenVPN Connect on Android). Once any device is connected to your office VPN, you're good to browse to whatever device on that network you wish.

jo_wen

Posted 2018-04-07T03:01:05.597

Reputation: 1

I tried Open VPN Connect on my Android phone but it was not able to connect. Probably because at my office we have an IPsec VPN with PSK. On Open VPN Connect I also tried checking the option: Import autologin profile but it failed. Is there a clear way using IP routing? – davidesp – 2018-04-07T06:48:17.053

Actually both Android and iOS have VPN profile options for IPSEC Xauth PSK setups. If you're determined to not go that direction then I think you might need two NIC cards setup in your machine. – jo_wen – 2018-04-07T17:31:40.633

0

For that to work PC-A must:

1- connect to the office via VPN 2- be able to share the VPN connection with the network behind (that includes IP Routing/Forwarding and NAT).

Doing all that with one interface is possible in theory, but depends on OS capabilities in practice. Windows 10 and its family of operating systems are not equipped with such features. For that to happen PC A must have 2 network interfaces, connecting to office via one, sharing the connection through another.

Therefore, the other workaround for your situation is to fix VPN connection on the mobile device itself by setting correct parameters office admin gives you.

MTG

Posted 2018-04-07T03:01:05.597

Reputation: 184