Hi,
I'm running openVPN on a Freenas jail and everything is working perfect, the problem i have is i would like to be able to access the VPN clients that are connected to the VPN server from the local lan of the freenas jail.
my network topo is as follows
local router 192.168.0.1
freenas server 192.168.0.111
openvpn jail 192.168.0.4
openvpn network 172.16.8.0/24
openvpn jail 172.16.8.1
when a client connects i they are able to access the internet and the local network but i cant access the VPN clients from the local lan. e.g ping from VPN client > Local lan = ok
Local client > VPN lan = fail
I assumed this as i dont have the route in my router as i see the packets get sent to the internet when i use traceroute. When i configured a device on the local lan with the gateway of the openvpn jail 192.168.0.4 i was still unable to access any of the vpn clients.
When I have connected 2 devices to the vpn server but they are unable to access each other i assume this is a ipfw rule issue but i think i have added all possible routes.
below are my ipfw rules.
ipfw -q -f flush
ipfw -q nat 1 config if ${EPAIR}
ipfw -q add nat 1 all from 172.16.8.0/24 to any out via ${EPAIR}
ipfw -q add nat 1 all from any to any in via ${EPAIR}
TUN=$(/sbin/ifconfig -l | tr " " "\n" | /usr/bin/grep tun)
ifconfig ${TUN} name tun0
Is it even possible to access the VPN lan from the local lan using the VPN server as the gateway? i know i will loose local and internet access using the VPN server as a gateway.
I know it is possible on openvpn access server to access the VPN lan from the local lan but i cant find anything online or on this site about it for openvpn server, but i just may be wording my search incorrectly.
If anyone knows how or has information about it could you please advice.
My config files.
Server
Server OS = FreeNAS
Version = OpenVPN 2.4.4 amd64-portbld-freebsd11.1
port 10011
proto tcp
dev tun
ca /mnt/keys/ca.crt
cert /mnt/keys/openvpn-server.crt #Server public key
key /mnt/keys/openvpn-server.key #Server private key
dh /mnt/keys/dh.pem #Diffie-Hellman parameters
server 172.16.8.0 255.255.255.0 #VPN network
ifconfig-pool-persist ipp.txt #ips of connected devices log
push "route 192.168.0.0 255.255.255.0" #Local network
tls-auth /mnt/keys/ta.key 0
#crl-verify crl.pem
keepalive 10 120
cipher AES-256-CBC
auth SHA256
group nobody
user nobody
#comp-lzo #deprecated
persist-key
persist-tun
client-to-client #allows vpn clients to communicate.
verb 4
Client
Client OS's Mac, linux, android and windows
client
dev tun
proto tcp
remote <MYPUBLICIPADDRESS> 443
resolv-retry infinite
nobind
auth SHA256
persist-key
persist-tun
ca ca.crt
cert mac.book.crt
key mac.book.key
remote-cert-tls server
cipher AES-256-CBC
tls-auth ta.key 1
dhcp-option DNS 192.168.0.1
redirect-gateway def1
verb 4
thanks in advance for any help or suggestions