Two subnets

Need help configuring your VPN? Just post here and you'll get that help.

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
beerox1
OpenVpn Newbie
Posts: 2
Joined: Thu Jan 05, 2023 10:12 am

Two subnets

Post by beerox1 » Thu Jan 05, 2023 10:26 am

I have two subnets 192.168.0.0/16 and 10.10.10.0/24. When a linux machine(192.168.5.2) connects to the vpn, it can only be connected from the subnet 192.168.0.0/16 and not from the other one.
Is it possible to set the configuration file of the openvpn client so that it knows that, for example, 10.10.10.7 is a computer in the local network?

Thanks in advance

beerox1
OpenVpn Newbie
Posts: 2
Joined: Thu Jan 05, 2023 10:12 am

Re: Two subnets

Post by beerox1 » Thu Jan 05, 2023 12:25 pm

I added the following lines to the config file and it seems to work, thank you

route 10.10.10.0 255.255.255.0 net_gateway

Post Reply