I set up OpenVPN following this guide: https://forums.freenas.org/index.ph...-6-with-access-to-remote-hosts-via-nat.22873/
I am able to connect to the VPN from my iphone, but I cannot access any of the hosts on my home local network. I tried to ping some of the IPs on my home LAN but got no response. I bet I screwed something up in one of the config files but I can't figure out what. I've compared everything to the guide many times and just can't seem to find what I did wrong. Can anyone look at my config and offer any help?
Ill try to post all relevant info.
On my home network:
FreeNAS box: 10.0.0.38/24
Gateway: 10.0.0.1
OpenVPN Jail: 10.0.0.5/24
Here is my openvpn.conf file:
Here is /usr/local/etc/ipfw.rules from within the openvpn jail:
Here is /etc/rc.conf from within the openvpn jail:
ipfw list from within the openvpn jail:
sockstat -4 -l from within the openvpn jail:
work-vpn.opvn file:
And finally a screenshot from my phone:
I am able to connect to the VPN from my iphone, but I cannot access any of the hosts on my home local network. I tried to ping some of the IPs on my home LAN but got no response. I bet I screwed something up in one of the config files but I can't figure out what. I've compared everything to the guide many times and just can't seem to find what I did wrong. Can anyone look at my config and offer any help?
Ill try to post all relevant info.
On my home network:
FreeNAS box: 10.0.0.38/24
Gateway: 10.0.0.1
OpenVPN Jail: 10.0.0.5/24
Here is my openvpn.conf file:
Code:
port 10011 proto udp dev tun ca /mnt/openvpn/keys/ca.crt cert /mnt/openvpn/keys/openvpn-server.crt key /mnt/openvpn/keys/openvpn-server.key dh /mnt/openvpn/keys/dh2048.pem server 10.8.0.0 255.255.255.0 ifconfig-pool-persist ipp.txt push "route 10.0.0.0 255.255.255.0" route 10.0.0.5 255.255.255.0 10.8.0.1 #tls-auth /mnt/openvpn/keys/auth.key 0 #crl-verify /mnt/openvpn/keys/crl.pem keepalive 10 120 group nogroup user nobody comp-lzo persist-key persist-tun verb 3
Here is /usr/local/etc/ipfw.rules from within the openvpn jail:
Code:
#!/bin/sh EPAIR=$(/sbin/ifconfig -l | tr " " "\n" | /usr/bin/grep epair) ipfw -q -f flush ipfw -q nat 1 config if ${EPAIR} ipfw -q add nat 1 all from 10.8.0.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
Here is /etc/rc.conf from within the openvpn jail:
Code:
portmap_enable="NO" sshd_enable="NO" sendmail_enable="NO" sendmail_submit_enable="NO" sendmail_outbound_enable="NO" sendmail_msp_queue_enable="NO" hostname="OpenVPN" devfs_enable="YES" devfs_system_ruleset="devfsrules_common" inet6_enable="YES" ip6addrctl_enable="YES" openvpn_enable="YES" openvpn_if="tun" openvpn_configfile="/mnt/openvpn/openvpn.conf" openvpn_dir="/mnt/openvpn" cloned_interfaces="tun" gateway_enable="YES" firewall_enable="YES" firewall_script="/usr/local/etc/ipfw.rules"
ipfw list from within the openvpn jail:
Code:
00100 nat 1 ip from 10.8.0.0/24 to any out via epair3b 00200 nat 1 ip from any to any in via epair3b 65535 allow ip from any to any
sockstat -4 -l from within the openvpn jail:
Code:
USER COMMAND PID FD PROTO LOCAL ADDRESS FOREIGN ADDRESS nobody openvpn 25284 6 udp4 *:10011 *:* root syslogd 25252 7 udp4 *:514 *:*
work-vpn.opvn file:
Code:
client dev tun proto udp6 remote <myurl> 10011 resolv-retry infinite nobind persist-key persist-tun ca ca.crt cert <cert>.crt key <key>.key #tls-auth auth.key 1 ns-cert-type server comp-lao verb 3
And finally a screenshot from my phone:
