3 subnets and routing problem

Scripts with setup, destroy, and modify routing tables and firewall rulesets for client connections.

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

Post Reply
niqu1982
OpenVpn Newbie
Posts: 5
Joined: Tue Aug 30, 2022 9:00 pm

3 subnets and routing problem

Post by niqu1982 » Tue Aug 30, 2022 9:12 pm

Hi all.
From beginning i Have 3 different locations
Location A My home lan address 192.168.2.0/24 VPN endpoint 10.8.0.2
Location B My office lan address 192.168.44.0/24 VPN server and input gateway with masquarade ( VPN's tun's address 10.8.0.1 and 10.8.1.1)
Location C my vacation house lan address 192.168.3.0/24 VPN Endpoint 10.8.1.2 computer with opevpn client 192.168.3.2

Connection from Location A to and B to A working fine with "full routing" subnet to subnet but i have problem with Location A to C ( routing problem)
From Location A i can see only 192.168.3.2 ( my vpn client computer) but i cat't see nothing more inside network 192.168.3.x
From location B i see only 192.168.3.2 and don't see any computer from network 192.168.3.x
From server ( Location B) i see only 192.168.3.2 not see any 192.168.3.x
From location C i can see full network 192.168.44.x

Routing tables:

Server side
0.0.0.0 194.63.135.129 0.0.0.0 UG 0 0 0 enp2s0f0
10.8.0.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun1
10.8.1.2 0.0.0.0 255.255.255.255 UH 0 0 0 tun2
192.168.2.0 10.8.0.1 255.255.255.0 UG 0 0 0 tun1
192.168.3.0 10.8.1.1 255.255.255.0 UG 0 0 0 tun2
192.168.44.0 0.0.0.0 255.255.255.0 U 0 0 0 enp2s0f1
194.63.135.128 0.0.0.0 255.255.255.128 U 0 0 0 enp2s0f0


Location C side:
0.0.0.0 192.168.3.160 0.0.0.0 UG 100 0 0 enp2s0
10.8.1.1 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
192.168.2.0 10.8.1.1 255.255.255.0 UG 0 0 0 tun0
192.168.3.0 10.8.1.1 255.255.255.0 UG 0 0 0 tun0
192.168.3.0 0.0.0.0 255.255.255.0 U 100 0 0 enp2s0
192.168.44.0 10.8.1.1 255.255.255.0 UG 0 0 0 tun0

Config's file:
Server for location C
port 1195
dev tun2
ifconfig 10.8.1.1 10.8.1.2
#route 192.168.44.0 255.255.255.0
push "route 192.168.44.0 255.255.0.0"
push "route 10.8.1.0 255.255.255.0"
push "route 192.168.2.0 255.255.0.0"
push "route 10.0.1.0 255.255.255.0"
secret jan.key
proto tcp-server
ping-timer-rem
persist-tun
persist-key
proto udp4
auth SHA1
keepalive 10 120
status /var/log/openvpn-status.log 60
status-version 2
log-append openvpn.log
explicit-exit-notify 1


Client C side
remote x.x.x.x
port 1195
dev tun
ifconfig 10.8.1.2 10.8.1.1
secret jan.key
route 192.168.3.0 255.255.255.0
route 192.168.44.0 255.255.255.0
route 192.168.2.0 255.255.0.0

Any suggestion what's i'm doing wrong ?

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

Re: 3 subnets and routing problem

Post by TinCanTech » Tue Aug 30, 2022 11:07 pm

niqu1982 wrote:
Tue Aug 30, 2022 9:12 pm
Any suggestion what's i'm doing wrong ?
Too much time relaxing in your vacation home, not enough time studying.

I can fix it for a fee.

niqu1982
OpenVpn Newbie
Posts: 5
Joined: Tue Aug 30, 2022 9:00 pm

Re: 3 subnets and routing problem

Post by niqu1982 » Wed Aug 31, 2022 7:22 am

Vacation house is house of my parents i don't have time to relax

niqu1982
OpenVpn Newbie
Posts: 5
Joined: Tue Aug 30, 2022 9:00 pm

Re: 3 subnets and routing problem

Post by niqu1982 » Wed Aug 31, 2022 7:09 pm

TinCanTech wrote:
Tue Aug 30, 2022 11:07 pm
niqu1982 wrote:
Tue Aug 30, 2022 9:12 pm
Any suggestion what's i'm doing wrong ?
Too much time relaxing in your vacation home, not enough time studying.

I can fix it for a fee.
Realy ? WOW i know this. $$$ nothing more.
I try find something in wiki but i don't finded nothing.
Next forum just like - RTFM no link to article or something...

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

Re: 3 subnets and routing problem

Post by TinCanTech » Wed Aug 31, 2022 9:09 pm

You need to learn routing.

OpenVPN is a VPN not a router.

niqu1982
OpenVpn Newbie
Posts: 5
Joined: Tue Aug 30, 2022 9:00 pm

Re: 3 subnets and routing problem

Post by niqu1982 » Wed Aug 31, 2022 9:23 pm

Ok from all "tutorials" and manuals routing looks OK i try many solutions but still not success.
site 2 site as 2 different networks working ok but add third no way. If You have article about routing principles where i can find help please write hear. I love learning but for me that looks OK.

And I'm sorry if I knew what was wrong, I wouldn't write here

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

Re: 3 subnets and routing problem

Post by TinCanTech » Wed Aug 31, 2022 10:06 pm

I do not know of a documented example of your requirements.

niqu1982
OpenVpn Newbie
Posts: 5
Joined: Tue Aug 30, 2022 9:00 pm

Re: 3 subnets and routing problem

Post by niqu1982 » Thu Sep 01, 2022 9:21 am

So why You write i can do this for money ?

Post Reply