Multiple subnets
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.
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
-
- OpenVpn Newbie
- Posts: 6
- Joined: Wed Oct 11, 2017 5:45 pm
Multiple subnets
Hi all
Please I need help with server config
I have 3 routers as openvpn clients with 192.168.4.0/24 subnet on lan interface.
I need route trafic 192.168.4.0/24 from client1 with vpn ip 10.8.0.6 to router (10.8.0.2)
trafic 192.168.4.0/24 from client2 with vpn ip 10.8.0.7 to router (10.8.0.3)
and trafic 192.168.4.0/24 from client3 with vpn ip 10.8.0.8 to router (10.8.0.4)
Sorry my english is horryble
THX
Please I need help with server config
I have 3 routers as openvpn clients with 192.168.4.0/24 subnet on lan interface.
I need route trafic 192.168.4.0/24 from client1 with vpn ip 10.8.0.6 to router (10.8.0.2)
trafic 192.168.4.0/24 from client2 with vpn ip 10.8.0.7 to router (10.8.0.3)
and trafic 192.168.4.0/24 from client3 with vpn ip 10.8.0.8 to router (10.8.0.4)
Sorry my english is horryble
THX
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Multiple subnets
Do you mean all the subnets behind each of the routers s the same number .. 192.168.4.0/24 ?
-
- OpenVpn Newbie
- Posts: 6
- Joined: Wed Oct 11, 2017 5:45 pm
Re: Multiple subnets
Yes all routers have same address range on lan.
I need route trafic from specific client to specific router.
I need route trafic from specific client to specific router.
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Multiple subnets
That is not how networks work and why the internet has almost run out of IPv4 address space.
-
- OpenVpn Newbie
- Posts: 6
- Joined: Wed Oct 11, 2017 5:45 pm
Re: Multiple subnets
And route source address 10.8.0.6 to gw 10.8.0.2TinCanTech wrote:That is not how networks work and why the internet has almost run out of IPv4 address space.
source address 10.8.0.7 to gw 10.8.0.3 ...
Is not possible?
Odesláno z mého SM-G935F pomocí Tapatalk
-
- OpenVPN Protagonist
- Posts: 11137
- Joined: Fri Jun 03, 2016 1:17 pm
Re: Multiple subnets
Please read this and answer your own question:
HOWTO: Expanding the scope of the VPN to include additional machines
HOWTO: Expanding the scope of the VPN to include additional machines
-
- OpenVpn Newbie
- Posts: 6
- Joined: Wed Oct 11, 2017 5:45 pm
Re: Multiple subnets
Hi all
WINDOWS VPN client have address 10.8.0.4 for example
ROUTER as VPN client have address 10.8.0.8 and lan subnet 192.168.4.0/24
ON VPN server is route table horap
ip rule show
ip route show table horap
But tracert is end on 10.8.0.1 (VPN SERVER IP)
THX for help
WINDOWS VPN client have address 10.8.0.4 for example
ROUTER as VPN client have address 10.8.0.8 and lan subnet 192.168.4.0/24
Code: Select all
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default x.x.x.1 0.0.0.0 UG 0 0 0 eth0
10.8.0.0 0.0.0.0 255.255.255.0 U 0 0 0 tun0
x.x.x.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
ip rule show
Code: Select all
0: from all lookup local
32764: from 10.8.0.4 lookup horap
32765: from all to 10.8.0.4 lookup horap
32766: from all lookup main
32767: from all lookup default
Code: Select all
default via 10.8.0.8 dev tun0
192.168.4.0/24 via 10.8.0.8 dev tun0
Code: Select all
ip -s route get 192.168.4.1 from 10.8.0.4 iif tun0
192.168.4.1 from 10.8.0.4 via 10.8.0.8 dev tun0 table horap
cache users 1 age 4056sec iif tun0
THX for help
-
- OpenVpn Newbie
- Posts: 6
- Joined: Wed Oct 11, 2017 5:45 pm
Re: Multiple subnets
Hi all
If i used TAP instead of TUN
Multiple routing tables are working perfect.
How i can disable internal roiting table in OPENVPN with TUN adapter?
I need route in kernel from openvpn client to openvpn client.
THX
If i used TAP instead of TUN
Multiple routing tables are working perfect.
How i can disable internal roiting table in OPENVPN with TUN adapter?
I need route in kernel from openvpn client to openvpn client.
THX