Difference between revisions of "PfSense Install"

From FusionPBX
Jump to: navigation, search
(added more detail into the previous notes.)
Line 13: Line 13:
 
press i (for insert)
 
press i (for insert)
 
paste the following:
 
paste the following:
----
+
#!/bin/sh
#!/bin/sh
+
rc_start() {
rc_start() {
+
        /usr/local/freeswitch/bin/./freeswitch -nc
        /usr/local/freeswitch/bin/./freeswitch -nc
+
}
}
+
rc_stop() {
+
rc_stop() {
 
         /usr/local/freeswitch/bin/./freeswitch -stop
 
         /usr/local/freeswitch/bin/./freeswitch -stop
}
+
}
case $1 in
+
 
 +
case $1 in
 
         start)
 
         start)
 
                 rc_start
 
                 rc_start
Line 32: Line 33:
 
                 rc_start
 
                 rc_start
 
                 ;;
 
                 ;;
esac
+
esac
----
+
 
 
Then press ESC (to exit insert mode) and type :wq (to write the file and quit vi)
 
Then press ESC (to exit insert mode) and type :wq (to write the file and quit vi)
  

Revision as of 01:17, 22 September 2010

  • Install PfSense from ISO [1]
  • install the pfSense vhosts package by using the pfsense web gui and going to System, packages
  • add a website to the package by going to System, vhosts:
- host: fusionpbx.local
- ipaddress: LAN interface IP address
- port: 8001
- directory: fusionpbx.local

After saving your settings you have to go to Status-services and restart the vhosts package

  • install freeswitch from a compiled download. Note that even though pfsense is built on freebsd, there is so much removed from the OS on pfsense in order to make it lean and secure that you don't have enough there to do a compile locally. If you want to compile your own freeswitch you need to do it on a matching version of freebsd and copy it across to pfsense when it is complete.
  • make freeswitch automatically start when the machine starts by going to a shell prompt on the machine and creating /usr/local/etc/rc.d/freeswitch.sh using vi. Do this by vi /usr/local/etc/rc.d/freeswitch.sh

press i (for insert) paste the following:

#!/bin/sh
rc_start() {
        /usr/local/freeswitch/bin/./freeswitch -nc
}

rc_stop() {
       /usr/local/freeswitch/bin/./freeswitch -stop
}
case $1 in
       start)
               rc_start
               ;;
       stop)
               rc_stop
               ;;
       restart)
               rc_stop
               rc_start
               ;;
esac

Then press ESC (to exit insert mode) and type :wq (to write the file and quit vi)

You can then start freeswitch by typing /usr/local/etc/rc.d/freeswitch.sh start

  • setup dns forwarder to point to fusion.local to the LAN IP address using the pfsense web gui - services, dns forwarder:

- host: fusionpbx - domain: local - ipaddress: the IP address of the LAN interface

  • Then back at the shell prompt do the following:
 pkg_add -r subversion
 cd /usr/local/vhosts/fusion.local/
 svn checkout http://fusionpbx.googlecode.com/svn/trunk/fusion.local

You have now installed freeswitch and fusionpbx and can start to configure it.