3 subnets and routing problem
Posted: 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 ?
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 ?