FreeBSD PF Script
2/05/2010 08:50:00 AM
Posted by johnhomer
Sample pf script for FreeBSD. This is what i used and it worked for me. WMMV
#! /bin/sh /sbin/ipfw -f flush # Block an IP address from connecting to external hosts/servers /sbin/ipfw add deny tcp from 192.168.1.57 to any # Redirect port all http traffic to a local proxy server /sbin/ipfw add fwd [ip.address.of.proxy],3128 tcp from any to any 80 # IPNAT /sbin/ipfw add divert natd all from any to any via dc0 # Some traffic shapping ipfw add pipe 2 ip from any to 192.168.1.101 ipfw pipe 2 config bw 33Kbit/s ipfw add pipe 3 ip from any to 192.168.1.102 ipfw pipe 3 config bw 512Kbit/s /sbin/ipfw add pass all from any to any
This entry was posted on October 4, 2009 at 12:14 pm, and is filed under
freebsd
. Follow any responses to this post through RSS. You can leave a response, or trackback from your own site.
Subscribe to:
Post Comments (Atom)
Post a Comment