How to see local IPs (sideB) from Client (sideA) via VPS (sideC)

This forum is for admins who are looking to build or expand their OpenVPN setup.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
mozo7
OpenVpn Newbie
Posts: 1
Joined: Mon Mar 08, 2021 11:12 pm

How to see local IPs (sideB) from Client (sideA) via VPS (sideC)

Post by mozo7 » Mon Mar 08, 2021 11:15 pm

Hi!

I'm not network / vpn specialist and I am fighting with the below problem.

I'm planning to go abroad in few weeks time and work from there. I'm using laptop with Windows installed (Side A - Client). I would like to have a possibility to connect to my office lan network (Side B). The network provider in Side B does not offer public IP. Therefore, I decided to buy VPS server Centos (somehow side C) and install OpenVPN server on it. The network in side B has a router which has a feature allowing it to work as OpenVPN client.

I set up the OpenVPN server on VPS, generated certificaties and could connect both router (side B) and Client (side A) to the VPS server. However, from Client I could see only VPN address of Router 10.8.0.1 and can't ping Side B network computers which are behind it.

Router.conf

Code: Select all

client
dev tun
proto udp
remote PUBLIC_IP_VPS 1195
resolv-retry infinite
#nobind
persist-key
persist-tun
remote-cert-tls server
auth SHA512
cipher AES-256-CBC
setenv opt block-outside-dns
verb 3
<ca>
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
-----END PRIVATE KEY-----
</key>
<tls-crypt>
-----BEGIN OpenVPN Static key V1-----
-----END OpenVPN Static key V1-----
</tls-crypt>
keepalive 10 60
user nobody
group nobody
Same for Client.conf

Code: Select all

client
dev tun
proto udp
remote PUBLIC_IP_VPS 1195
resolv-retry infinite
#nobind
persist-key
persist-tun
remote-cert-tls server
auth SHA512
cipher AES-256-CBC
setenv opt block-outside-dns
verb 3
<ca>
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
-----END PRIVATE KEY-----
</key>
<tls-crypt>
-----BEGIN OpenVPN Static key V1-----
-----END OpenVPN Static key V1-----
</tls-crypt>
keepalive 10 60
user nobody
group nobody
Server.conf

Code: Select all

local PUBLIC_IP_VPS
port 1195
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh.pem
auth SHA512
tls-crypt tc.key
topology subnet
server 10.8.0.0 255.255.255.0
push "redirect-gateway def1 bypass-dhcp"
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
keepalive 10 120
cipher AES-256-CBC
user nobody
group nobody
persist-key
persist-tun
status openvpn-status.log
verb 3
crl-verify crl.pem
explicit-exit-notify
route 192.168.1.1 255.255.255.0
push "route 192.168.1.1 255.255.255.0"
client-to-client
client-config-dir ccd
management localhost 7505

Side A - Client
10.8.0.2
192.168.43.71 ipv4
255.255.255.0 subnet mask
192.168.43.1 default gateway

Side B - Router
10.8.0.5
192.168.1.1 ipv4
255.255.255.0 mask

Side C - VPS
10.8.0.1

What other OpenVPN/OS/router configurations I should put in order to achieve a goal of seeing local machines in Side B from Side A via VPS?
Apologies, if I did not provide You with enough information. Will do so on Your request!
Thank You in advance for any hints!

BR,
Adam.

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: How to see local IPs (sideB) from Client (sideA) via VPS (sideC)

Post by TinCanTech » Tue Mar 09, 2021 8:32 pm

mozo7 wrote:
Mon Mar 08, 2021 11:15 pm
I'm planning to go abroad in few weeks time and work from there
mozo7 wrote:
Mon Mar 08, 2021 11:15 pm
I would like to have a possibility to connect to my office lan network
mozo7 wrote:
Mon Mar 08, 2021 11:15 pm
I'm not network / vpn specialist
Then that is what you need. Somebody who is qualified to do this Work for you.

300000
OpenVPN Expert
Posts: 685
Joined: Tue May 01, 2012 9:30 pm

Re: How to see local IPs (sideB) from Client (sideA) via VPS (sideC)

Post by 300000 » Tue Mar 09, 2021 8:44 pm

It is very easy to do that if you know how to make site to site connection , as long as you know making this kind of thing take time and after many try and error you can make it but you need to learn a lot before you can do this .



If you do this for business so it is more faster ask someone do it for you , it work out very quick for you. Just sent an email to TinCanTech so he can help you with fee .

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: How to see local IPs (sideB) from Client (sideA) via VPS (sideC)

Post by TinCanTech » Tue Mar 09, 2021 9:13 pm

@300000 -- You can do his job for him for free if you like ..

Post Reply