Hi! I was hoping I might be able to get a hand with setting up a VPN on TrueNAS Scale 22.02.2.1.
I have followed steps according to two tutorials. This tutorial guided me through configuring the relevant certificates required to set up the OVPN server, as well as adding the static route within the NAS and adding the additional parameters to the server. I have set my OVPN server on the 192.168.10.0/24 network, where my LAN is 192.168.0.0/24.
I then attempted to configure NAT using this tutorial. This instructed me to first add net.ipv4.ip_forward with a value of 1 to Sysctl, then add the following PostInit scripts to my init/shutdown scripts:
Somewhere along in this process I was able to access the TrueNAS webpage over the VPN connection, including accessing it's webpage and a VNC of a hosted VM via the VPN address of 192.168.10.1 or the LAN address of 192.168.0.100. I was unable to access any other devices within my LAN however. Somewhere along, this functionality broke as I was aiming to set up full LAN access. When I connect to the server using a remote OVPN client, I am successfully assigned an IP within the 192.168.10.0/24 network, however the client device then becomes completely offline, having no access to either the VPN network not the LAN or the public internet.
I'm not too sure exactly what I'm doing wrong and was hoping I might be able to get some help. Thank you!
PS: If it helps, I do have a slightly unique network setup on the server, in which the local IP of 192.168.0.100 is actually assigned to a bridge labelled br0. This was to allow for my VM to access my local network for network shares and such.
I have followed steps according to two tutorials. This tutorial guided me through configuring the relevant certificates required to set up the OVPN server, as well as adding the static route within the NAS and adding the additional parameters to the server. I have set my OVPN server on the 192.168.10.0/24 network, where my LAN is 192.168.0.0/24.
I then attempted to configure NAT using this tutorial. This instructed me to first add net.ipv4.ip_forward with a value of 1 to Sysctl, then add the following PostInit scripts to my init/shutdown scripts:
Code:
NAT Rule 1: nft add table ip nat POSTINIT NAT Rule 2: nft 'add chain ip nat prerouting { type nat hook prerouting priority 0 ; }' POSTINIT NAT Rule 3: nft 'add chain ip nat postrouting { type nat hook postrouting priority 100 ; }' POSTINIT NAT Rule 4: nft 'add rule nat postrouting iifname openvpn-server oifname br0 ip saddr 192.168.10.0/24 masquerade' POSTINIT
Somewhere along in this process I was able to access the TrueNAS webpage over the VPN connection, including accessing it's webpage and a VNC of a hosted VM via the VPN address of 192.168.10.1 or the LAN address of 192.168.0.100. I was unable to access any other devices within my LAN however. Somewhere along, this functionality broke as I was aiming to set up full LAN access. When I connect to the server using a remote OVPN client, I am successfully assigned an IP within the 192.168.10.0/24 network, however the client device then becomes completely offline, having no access to either the VPN network not the LAN or the public internet.
I'm not too sure exactly what I'm doing wrong and was hoping I might be able to get some help. Thank you!
PS: If it helps, I do have a slightly unique network setup on the server, in which the local IP of 192.168.0.100 is actually assigned to a bridge labelled br0. This was to allow for my VM to access my local network for network shares and such.
Last edited: