VPN server with two subnet

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
headhunter942135
OpenVpn Newbie
Posts: 10
Joined: Sat Apr 30, 2016 12:48 pm

VPN server with two subnet

Post by headhunter942135 » Mon Jul 02, 2018 3:50 am

Currently have my OpenVPN setup so that
  • all clients are connected to the same subnet ( 10.8.0.0/24 ) when they are connected to the server
  • all clients route all their Internet traffic to OpenVPN
I would like to change it so that I can assign each client into one of two subnets ( ie. client1 on 10.8.0.0/24 and client2 on 10.8.0.1/24 ) so that
  • All clients will still route all their internet traffic to OpenVPN
  • Clients are not able to connect to other clients that are on different subnet
Any help would be appreciated.

Thanks

headhunter942135
OpenVpn Newbie
Posts: 10
Joined: Sat Apr 30, 2016 12:48 pm

Re: VPN server with two subnet

Post by headhunter942135 » Tue Jul 03, 2018 4:03 am

BTW my topology is subnet

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

Re: VPN server with two subnet

Post by TinCanTech » Tue Jul 03, 2018 10:20 am

If you want to stop your clients from being able to see each other
then do not use --client-to-client and add appropriate firewall rules.

headhunter942135
OpenVpn Newbie
Posts: 10
Joined: Sat Apr 30, 2016 12:48 pm

Re: VPN server with two subnet

Post by headhunter942135 » Tue Jul 03, 2018 10:21 pm

How do I set up two different subnets?

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

Re: VPN server with two subnet

Post by TinCanTech » Tue Jul 03, 2018 10:34 pm

You cannot.

See --server in The Manual v24x

Start here:
HOWTO: For OpenVPN Community Edition

Post Reply