To set up ACL’s based on MAC address:
Open squid.conf:
# vi /etc/squid/squid.conf
Local acl, section and append ACL as follows:
acl macf1 arp mac-address
acl macf2 arp 00:11:22:33:44:55
http_access allow macf1
http_access allow macf2
http_access deny all
Save and close the file. Restart squid server:
# /etc/init.d/squid restart
Install wget Using FreeBSD Ports Collection
Type the following command as root user to upgrade ports tree, enter:
# portsnap fetch update
Now, install the wget, enter:
# cd /usr/ports/ftp/wget
# make install clean
# rehash
You can easily redirect any sip uri based on opensips exec.so module on perl script. you need to load
loadmodule “exec.so”
In the route section you have to exec perl script with paramter $tu (To username) and $fu (from Username).
route {
if(method == “INVITE”) {
exec_dset(“/usr/local/bin/route.pl $fU $tU”);
sl_send_reply(“302″,”LCR Redirect”);
} else {
route(1);
}
}
In the perl script just write the follow code:
#!/bin/sh
echo sip:+121242415112@howtonix.com
NOTE: To get this to work correctly with Asterisk you need to add “promiscredir=yes” to the general section of your sip.conf
Lighttpd a secure, fast, compliant and very flexible web-server which has been optimized for high-performance environments. It has a very low memory footprint compared to other webservers and takes care of cpu-load.
Lighttpd on FreeBSD:
First update your port tree by typing following commands:
# portsnap fetch
# portsnap update
Install lighttpd web server under FreeBSD
Lighttpd port is located under /usr/ports/www/lighttpd:
# cd /usr/ports/www/lighttpd
Install lighttpd:
# make
# make install
# make clean
Start Lighttpd Server Under FreeBSD
To start Lighttpd server, enter:
# /usr/local/etc/rc.d/lighttpd start
Verify that lighttpd is running:
# netstat -nat
Auto start lighttpd service
You need to enable both services. Open /etc/rc.conf:
# vi /etc/rc.conf
Append following two lines:
lighttpd_enable="YES"
September 29th, 2009
emran
September 27th, 2009
emran
Add the following line on /etc/network/interfaces
up route add -net 172.22.0.0 netmask 255.255.254.0 gw 192.168.15.101 dev eth0 (The connected Hardware interface.)
Now restart the network service by
#/etc/init.d/networking restart