OpenVPN from Ubuntu Client t0 pfsense (client-to-net)
Ubuntu Client configuration: (this is my configuration,u guys may configure in your ways!)
### OpenVPN Client Conf (pfsense.ovpn) ###
float
port 1194
dev tun
proto tcp-client
cipher BF-CBC
remote yourpfsenseHOST 1194
ping 10
persist-tun
persist-key
tls-client
ca /where/your/openvpn/cert/stored/ca.crt
cert /where/your/openvpn/cert/stored/fenris.crt
key /where/your/openvpn/key/stored/fenris.key
ns-cert-type server
comp-lzo
pull
verb 4
daemon
pfSense server configuration:
### openvpn_server1.conf ###
writepid /var/run/openvpn_server1.pid
#user nobody
#group nobody
daemon
keepalive 10 60
ping-timer-rem
persist-tun
persist-key
dev tun
proto tcp-server
cipher BF-CBC
up /etc/rc.filter_configure
down /etc/rc.filter_configure
server 192.168.b.0 255.255.255.0
client-config-dir /var/etc/openvpn_csc
push “route 192.168.a.0 255.255.255.0″
lport 1194
ca /var/etc/openvpn_server1.ca
cert /var/etc/openvpn_server1.cert
key /var/etc/openvpn_server1.key
dh /var/etc/openvpn_server1.dh
comp-lzo
persist-remote-ip
float
————————————————————
To run the openvpn in ubuntu(client):
$ sudo openvpn –config /where/do/you/stored/save/configfile/pfsense.ovpn
Run the openvpn in pfsense:
# openvpn –config /var/etc/openvpn_server1.conf
————————————————————
Test & Check connection:
*** Welcome to pfSense 1.2-RELEASE-pfSense on pfsense ***
WAN* -> rl0 -> yourpfsenseHOST
LAN* -> rl1 -> 192.168.a.b
$ ping 192.168.a.b
PING 192.168.a.b (192.168.a.b) 56(84) bytes of data.
64 bytes from 192.168.a.b: icmp_seq=1 ttl=64 time=45.4 ms
64 bytes from 192.168.a.b: icmp_seq=2 ttl=64 time=43.2 ms
64 bytes from 192.168.a.b: icmp_seq=3 ttl=64 time=43.3 ms
64 bytes from 192.168.a.b: icmp_seq=4 ttl=64 time=41.3 ms
64 bytes from 192.168.a.b: icmp_seq=5 ttl=64 time=43.4 ms
— 192.168.a.b ping statistics —
5 packets transmitted, 5 received, 0% packet loss, time 4001ms
rtt min/avg/max/mdev = 41.315/43.357/45.427/1.327 ms
$ netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
192.168.b.1 192.168.b.5 255.255.255.255 UGH 0 0 0 tun0
192.168.b.5 0.0.0.0 255.255.255.255 UH 0 0 0 tun0
192.168.1.0 192.168.b.5 255.255.255.0 UG 0 0 0 tun0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 wlan0
192.168.57.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet1
192.168.206.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet8
0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 wlan0






