I have run up to the wall in the FreeBSD forums with my attempts.
the issue might be with my attempt to use the Virtual Box virtual Machine
My goal is to be able to have a client access the Server and pass all traffic (HTTP ssh mail etc) through the servers internet connection
My server.conf is
local 10.0.1.24
port 1194
proto udp
dev tun
ca /usr/local/etc/ssl-admin/active/ca.crt
cert /usr/local/etc/ssl-admin/active/server.crt
key /usr/local/etc/ssl-admin/active//server.key
dh /usr/local/etc/ssl-admin/dh2048.pem
server 172.16.0.0 255.255.255.0
push "redirect-gateway def1"
push "route 10.0.1.0 255.255.255.0"
ifconfig-pool-persist ipp.txt
keepalive 10 120
cipher BF-CBC # Blowfish (default)
comp-lzo
user nobody
group nobody
push "dhcp-option DNS 8.8.8.8"
persist-key
persist-tun
status /var/log/openvpn.log
verb 9
mute 10
my pf.conf is
vpn_net = "172.16.9.0/24"
ext_if = "em0"
vpn_if = "tun0"
nat on $ext_if inet from $vpn_net to any -> ($ext_if)
pass in quick proto udp from any to port 1194 keep state label "openvpn"
pass quick on $vpn_if keep state
netstat -nr on server is
Routing tables
I
nternet:
Destination Gateway Flags Refs Use Netif Expire
default 10.0.1.1 UGS 0 759 em0
10.0.1.0/24 link#1 U 0 20 em0
10.0.1.24 link#1 UHS 0 0 lo0
127.0.0.1 link#3 UH 0 352 lo0
172.16.0.0/24 172.16.0.2 UGS 0 0 tun0
172.16.0.1 link#4 UHS 0 0 lo0
172.16.0.2 link#4 UH 0 0 tun0
The client can connect via ssh through the VPN but nothing else
the client neststat -nr shows
Internet:
Destination Gateway Flags Refs Use Netif Expire
0/1 172.16.0.5 UGSc 1 0 tun0
default 10.0.1.1 UGSc 2 0 en0
default 10.0.1.1 UGScI 0 0 en1
10.0.1/24 link#4 UCS 5 0 en0
10.0.1/24 link#5 UCSI 6 0 en1
10.0.1.1 74:d0:2b:85:4e:28 UHLWIir 3 610 en0 1192
10.0.1.1 link#5 UHLWIir 1 0 en1
10.0.1.24/32 10.0.1.1 UGSc 1 0 en0
10.0.1.24 8:0:27:48:82:22 UHLWI 0 0 en1
10.0.1.33 64:b9:e8:ff:e8:49 UHLWI 0 50 en0 603
10.0.1.33 64:b9:e8:ff:e8:49 UHLWI 0 0 en1 603
10.0.1.42 127.0.0.1 UHS 0 227 lo0
10.0.1.88 90:27:e4:e9:d6:1c UHLWI 0 1 en0 156
10.0.1.100 127.0.0.1 UHS 0 267 lo0
10.0.1.150 c4:2c:3:5:34:66 UHLWIi 3 7403689 en0 1054
10.0.1.150 c4:2c:3:5:34:66 UHLWI 0 93 en1 1054
10.0.1.255 ff:ff:ff:ff:ff:ff UHLWbI 0 14 en0
10.0.1.255 ff:ff:ff:ff:ff:ff UHLWbI 0 2 en1
127 127.0.0.1 UCS 0 0 lo0
127.0.0.1 127.0.0.1 UH 25 42714422 lo0
128.0/1 172.16.0.5 UGSc 2 5 tun0
169.254 link#4 UCS 0 0 en0
172.16.0.1/32 172.16.0.5 UGSc 1 3 tun0
172.16.0.5 172.16.0.6 UHr 7 0 tun0
Gateway is enabled in rc.conf and i have added net.net.ip.forwarding=1 to the cyst.conf
Any thoughts would be appreciated