Accessing jailed WebServer from OpenVPN client side

NicoJ

Cadet
Joined
Mar 30, 2023
Messages
1
Hi everyone,

I'm addressing the community because I'm having issues with installing a VPN via TrueNas Core.
First of all, I am kind of a noob when it comes to networking techniques. However, by following many tutorials (mostly from this guy: https://www.youtube.com/watch?v=S8I-IiQYVas) and documentation, I managed to create a working VPN.

My goal is to access a WebServer and a WebApp ip address located in a TrueNas jail from the client side of the vpn.


System information: TrueNAS-13.0-U4 (Core)
Motherboard: Gigabyte B550M DS3H
CPU: Ryzen 5 4600G
RAM: 16 Go
Hard drives: 2x Seagate IronWolf 6 To

Here is my network topology
Device Type: TAP
Local subnet: 192.168.21.0/24
Gateway (router): 192.168.21.254
OpenVPN Server: 192.168.21.179
OpenVPN Tun Subnet: 10.66.22.0/24:8121
WebServer (jailed): 192.168.21.74
WebApp (jailed): 192.168.21.75:3000

OpenVPN server additional parameters
push "route 192.168.21.0 255.255.255.0"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 1.1.1.1"
client-config-dir /etc/certificates
ccd-exclusive
auth-nocache

Here are the existing System/Tunables
firewall_enable yes RC
firewall_type open RC
gateway_enable yes RC
natd_enable yes RC
natd_flags -dynamic -m RC
natd_interface le0 RC
net.inet.ip.forwarding 1 SYSCTL
net.ipv4.conf.all.forwarding 1 SYSCTL


At this time, I can connect to the VPN, but I can't find a way to access both my WebServer and my WebApp from the client side.
From 192.168.21.0/24 local subnet, I can access them as expected.

Some additional information:
I selected the TAP device type because I understood that this was the right way to access a network printer on the VPN server side for example.
During my journey, I thought that the problem might be related to the firewall. I tried to disable the firewall (with firewall_enable), but that doesn't seem to be the source of my problem. Maybe there is something to do with ipfw command?
I also thought it might be related to a missing route.
And now I'm really stepping out of my comfort zone.


Any hints or tips that would help my installation to be functional would be appreciated.
Any other comments are also welcome!

Many thanks in advance for your help!
 
Top