cp /usr/src/sys/i386/conf/GENERIC /usr/src/sys/i386/conf/SQUIRREL
vi /usr/src/sys/i386/conf/SQUIRREL
options IPFIREWALL
options IPDIVERT options IPFIREWALL_DEFAULT_TO_ACCEPT
options IPFIREWALL_VERBOSEoptions IPFIREWALL_FORWARD2. Change to the /usr/src directory:cd /usr/src3. Compile the kernel:make buildkernel KERNCONF=SQUIRREL
While the kernel is compiling, do not interrupt the terminal
You can stop this process at anytime by pressing CTRL-C
Building a new kernel takes about two hours to complete with a quad 533mhz pentium III Xeon server. Don't give up even though the terminal may look like it has stopped.
4. Install the new kernel:make installkernel KERNCONF=SQUIRREL
Now edit the file /etc/rc.firewall
Add to the SIMPLE section:
${fwcmd} 1001 fwd 127.0.0.1,8080 tcp from any to any 80 in recv xl0
${fwcmd} add allow tcp from any to any in via fxp1${fwcmd} add allow tcp from any to any in via fxp0${fwcmd} add deny log tcp from 172.16.0.0/24 to 172.16.0.1
${fwcmd} add deny log tcp from 172.16.0.0/24 to 192.168.0.0/24${fwcmd} add deny log tcp from 172.16.0.0/24 to 10.1.10.0/24
${fwcmd} add allow udp from 0.0.0.0 68 to 255.255.255.255 dst-port 67 out${fwcmd} add allow udp from any 67 to me dst-port 68 in${fwcmd} add allow udp from any 67 to 255.255.255.255 dst-port 68 in${fwcmd} add allow icmp from any to any icmptypes 8${fwcmd} add allow icmp from any to any icmptypes 3,4,11
This means add rule number 1001 and forward ALL tcp packets; port 80 to 127.0.0.1 port 8080 on the third interface, xl0. Allow tcp packets to pass on fxp1 and fxp0. Since the server is public, Deny and log anything from 172.16.0.0/24 to the server at 172.168.0.1. Anything to the internal network is non-routable or not on the same network segment as the crossover cable to the network card but if you're also using natd to forward internet access, they will pass to the internal segment. The two following rules prevent anything passing to the xl0 interface. Next, uncomment allow dchp and imcp under the simple section of rc.firewall or add the five next rules to rc.firewall.
Now all packets that are destined for port 80 are transparently passed to port 8080 the proxy port.
shutdown -r now
There are several different content filtering software packages though dansguardian is free to use. However first we need a caching proxy server to pass information to the content filtering software. Squid is a web cache server and is easy to install if access control lists are used correctly.
Get the latest version of squid here:
http://www.squid-cache.org/Versions/
type:
gunzip squid*.tar.gz
tar -xvf squid*.tar
cd squid-3.0.STABLE24
./configure --enable-ipfw-transparent
gmake
make install
After squid is installed it can be found in /usr/local/squid. First we need to edit a file named squid.conf:
vi /usr/local/squid/etc/squid.conf
Squid conf is a huge configuration file, go to around line 1000:
Strike the ESC key
:set nu
:879
:ins
http_port 3128 transparent
Strike CRTL-C
Delete the previous http_port directive by alligning the cursor with the arrow keys.
:del
Now edit the access control lists, since squid is usually behind a firewall firstly, we will use open directives:
:592
acl localnet src 127.0.0.0/8
Scroll down to # INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS
gunzip dansguardian*.tar.gz
tar -xvf dansguardian*.tar
cd dansguardian-2.10.1.1
./configure
Left click "My Network Places" on the Windows workstation "desktop" such that it appears to turn BLUE in color. Next, right click the highlighted area. A "drop down menu" will appear.
Left click "Properties"
Next, Left click "Local Area Connection" such that it appears to turn BLUE in color. Next, right click the highlighted area. A "drop down menu" will appear.
A "Dialogue" Box will appear:
Left click "Internet Protocol TCP/IP" such that it appears to turn BLUE in color. Next, right click the properties box. A "Dialogue box" will appear.
Remember Me
a@href@title, strike