Webapp on Jail unreachable when openvpn client enabled on jail from separate lan/subnet

noenthu

Cadet
Joined
Dec 8, 2020
Messages
2
I've configured openvpn client (PIA strong config) to run on a TrueNas jail and am running a few services on it.

My setup is as follows

PFSense Firewall - WAN, LAN1 (192.168.1.0/24) , LAN2 (192.168.2.0/24)

LAN 2 has ethernet connected machines including the Truenas server
LAN 1 has a wireless AP connected which allows various wifi devices to connect.

I'm running Truenas on LAN2.. IP 192.168.2.4
On Truenas there is a Jail with dhcp IP 192.168.2.5. Jail has Openvpn running and a webapp on port 8080.
From another machine on LAN2.. I can go to 192.168.2.5:8080 and access the webapp.

From LAN1 devices (iphone, laptops etc).. I can connect to the Truenas interface at 192.168.2.4.
However, I cannot connect to the webapp running on 192.168.2.5:8080.
If I turn off Openvpn, I can now access the webapp from Lan1 to Lan2 again.

Any advice?
 

noenthu

Cadet
Joined
Dec 8, 2020
Messages
2
Looks like it just needed a little route add to set a gateway for the separate lan.

I added to /etc/rc.conf

Code:
static_routes="lan1"
route_lan1="-net 192.168.1.0/24 192.168.2.1"


Please let me know if this is the appropriate solution
 
Top