Allow internet access but block Server LAN access

This forum is for admins who are looking to build or expand their OpenVPN setup.

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
Catalyph
OpenVpn Newbie
Posts: 4
Joined: Fri Jul 09, 2021 10:00 pm

Allow internet access but block Server LAN access

Post by Catalyph » Fri Jul 09, 2021 10:07 pm

Im running truenas with OpenVPN.

I have the VPN setup and works and able to get internet access through the VPN tunnel as well as access to the TrueNas Share that is on a VLAN IP 192.168.168.20/24

Openvpn Server Local LAN 192.168.0.40/24
OpenVPN Client LAN 192.168.168.0/24

Im passing the options
push "route 192.168.168.0 255.255.255.0"
push "redirect-gateway bypass-dhcp"

This gets me access to the internet and the storage share (on same server as OpenVPN server) @ 192.168.168.40

But is also gives access to the OpenVPN servers LAN 192.168.0.0/24 and the machines on it.
Is there a way to allow the client to have internet access through the VPN but not be able to access the openVPN servers LAN ?

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

Re: Allow internet access but block Server LAN access

Post by TinCanTech » Fri Jul 09, 2021 10:38 pm

Firewall

Post Reply