It is strongly advised that you avoid running VoIPong with super-user, but use a non-privileged special user created only for it. This section describes the steps you should take to accomplish this. Note that these steps should be done after you compiled and installed VoIPong successfully.
Create voipong user and group
# pw group add voipong # pw user add voipong -g voipong -m -s /usr/local/bin/bash
Change ownership of voipong, voipctl and /usr/local/etc/voipong directory to voipong user:
# chown voipong /usr/local/bin/voipong # chown voipong /usr/local/bin/voipctl # chown -R voipong /usr/local/etc/voipong # chgrp -R voipong /usr/local/etc/voipong
Change ownership of BPF device files (/dev/bpf*) to voipong user:
# chown voipong /dev/bpf*
Switch user to voipong:
# su - voipong To see all of the directories on your FreeBSD system, type ls -R / | more -- Dru genesis@istar.ca %
Create runtime directories:
% mkdir logs % mkdir output % mkdir run
Change log, pid and output directory paths to the new directories in voipong.conf
logdir = /home/voipong/logs/ logfile = voipong.log outdir = /home/voipong/output/ cdrfile = /home/voipong/output/voipcdr.log pidfile = /home/voipong/run/voipong.pid mgmt_ipcpath = /home/voipong/run/voipongmgmt.sock
You can now run voipong
% id uid=1042(voipong) gid=1042(voipong) groups=1042(voipong) % voipong -d4 -f EnderUNIX VOIPONG Voice Over IP Sniffer starting... Release 2.0-DEVEL, running on devel.enderunix.org [FreeBSD 4.11-STABLE FreeBSD 4.11-STABLE #0: Tue Sep i386] (c) Murat Balaban http://www.enderunix.org/ 20/11/05 22:34:03: EnderUNIX VOIPONG Voice Over IP Sniffer starting... 20/11/05 22:34:03: Release 2.0-DEVEL running on devel.enderunix.org [FreeBSD 4.11-STABLE FreeBSD 4.11-STABLE #0: Tue Sep i386]. (c) Murat Balaban http://www.enderunix.org/ [pid: 41334] 20/11/05 22:34:03: Default matching algorithm: lfp 20/11/05 22:34:03: loadmodule: /usr/local/etc/voipong/modules/modvocoder_pcmu.so (@0x2817f3bc) 20/11/05 22:34:03: loadmodule: /usr/local/etc/voipong/modules/modvocoder_pcma.so (@0x281813e0) 20/11/05 22:34:03: loaded 2 module(s) 20/11/05 22:34:03: loadnet(10.0.0.145/255.255.255.255) method: fixed 49604 20/11/05 22:34:03: loadnet(172.16.0.10/255.255.0.0) method: lfp 20/11/05 22:34:03: fxp0 has been opened in promisc mode. (43.43.43.0/255.255.255.128)
You can check whether the daemon is running with the correct user with voipctl
% id uid=1042(voipong) gid=1042(voipong) groups=1042(voipong) % voipctl Connected to VoIPong Management Console System: devel.enderunix.org [FreeBSD 4.11-STABLE FreeBSD 4.11-STABLE #0: Tue Sep i386] voipong> info General Server Info: --------------------------: Server version : Release 2.0-DEVEL System : devel.enderunix.org [FreeBSD 4.11-STABLE FreeBSD 4.11-STABLE #0: Tue Sep i386] Current work. direct. : /usr/home/voipong Log level : 4 Mix Voice Flag : true Process ID (PID) : 41334 User : voipong [VoIPong Kullanicisi] Group : 1042 voipong>