Setup Free Firewall, Proxy Server
Posted in Linux | By AhTim @ March 5th, 2009
I’ve step the whole morning to setup firewall and proxy server with my colleague.
Well, due to budget constrain and experience, a linux box can easily fulfill our needs.
Remember my requested free original Ubuntu Linux? We configure Ubuntu as our free firewall and proxy server!!
The latest version 8.10 doesn’t seem too much different with my old version 7.04.
Setup Free Firewall
My colleague downloaded the latest Ubuntu and install on a normal computer. The Ubuntu was updated with all necessary patches and firewall tool — Firestarter. No hassle on firestarter installation, just select from Synoptic packager and wait until finish.
Firestarter is easier than iptables. Its GUI let you setup policy with few clicks away. Just open up standard port that need to use by your applications. Add authorized IP into Outbound policy.
Setup Free Proxy Server
The whole purpose of this linux box to control internet access. Proxy server make webpage loading faster. Also can control the usage, eg: restrict access to porn, violence website.
The free and easiest way is via Squid. Squid is free proxy server tool in linux. I use “apt-get” command to install Squid within few seconds.
After the installation, configure basic parameter in /etc/squid/squid.conf. Allow local LAN IP range and http_access. Once done, restart Squid service > /etc/init.d/squid restart
Now the Squid is running well. To make transparent proxy (for lazy administrator like me), add two lines iptables rules.
iptables -t nat -A PREROUTING -i eth0 -s ! squid-box -p tcp –dport 80 -j DNAT –to squid-box:3128
iptables -A PREROUTING -t nat -i eth0 -p tcp –dport 80 -j REDIRECT –to-port 3128
All HTTP request via proxy server automatic redirect to its Proxy port 3128 with rules applied. No configuration need on client PC.
My two cents
The setup was so smooth, out of my expectation. That means my Linux skill has improved. Wish to get more hands on to polish up my Linux knowledge. I worry will forget if not using for too long time.
Are you using Linux box? Which Linux is it? Ubuntu, SUSE, Fedora or …?
Related Articles
Tags: firestarter, free firewall, Linux, proxy server, squid, ubuntu
March 5th, 2009 at 2:22 pm
…use Slackware for my firewall
May 30th, 2009 at 6:57 am
China firewall is lame, use water to put out the fire of the wall but how do you get over the wall? – use Freedur.com to bypass it. You can bypass China Great Firewall and access youtube, facebook, blogger and all other sites which are blocked.
June 10th, 2009 at 9:46 am
@WingLoon: Happy to know you’re Linux guy too.
@Jeff: Can we use the proxy to access China website faster?