Linux as a Proxy Server

How do you keep unwanted visitors out of your network while still giving your users the Internet access they rely on? The answer is a firewall equipped with a proxy server.

The TIS fwtk builds fairly easily. I had to apply the http-gw patch in order to get the HTTP proxy to build. If you are building this toolkit on a system other than Linux, make sure you use gmake instead of make. I ran into this problem when I tried to build this package on an SGI. Doing this may require you to first acquire and build GNU make, which is available at

There is no configure script available with the TIS fwtk. Instead, there are several versions of the Makefile.config. Simply apply the http-gw patch, move Makefile.config.linux to Makefile.config, run make and then run make install. Note that in order to build the x-gw X proxy, you need the Motif libraries. The easiest way to get them is to download lesstif, a Motif clone available at The following are the steps required to build and install the fwtk software:

tar xvzf fwtk-2.0.tar.gz
cd fwtk
chmod -R 755 *
tar xvf ../http-gw.patch.tar
mv Makefile.config Makefile.config.orig
ln -s Makefile.config.linux Makefile.config
make install
TIS fwtk Configuration

The binaries are placed in the /usr/local/etc directory, a location not likely to be affected by system upgrades. The proxies can be configured to run as daemons or by inetd. Take careful note of the man pages. There are specific command-line arguments that must be invoked in order to get the proxy to run as a daemon. As I mentioned above, you can configure as many or as few of the proxies provided. The configuration is much more complicated than for the Socks5 server. The configuration file is called /usr/local/etc/netparam and is parsed based on the proxies. Each line starts with the name of the proxy followed by a colon and then by the options (see Listing 4).

Listing 4

The client configuration is different from the Socks5 configuration. For the two browsers mentioned above, simply leave the Socks5 entry blank and fill in the HTTP proxy and port, as well as FTP and TELNET entries, if you have set these services up on the firewall. Good news for those using a browser other than Navigator and Explorer—you can use the TIS fwtk http-gw proxy with any browser. Simply prefix all web addresses with http://IP-or-name-of-firewall-host/. For FTP, you first FTP to the proxy-server host. When prompted for the user name, enter; the proxy then goes out and makes the appropriate connection. For News, you must configure the plug-gw as illustrated in the configuration file (see Listing 4). Accessing news is as simple as configuring your news client to point to the proxy server instead of the real news server.

Integrating both packages

When I first set out to construct a firewall/proxy server solution where I work, I initially chose the Socks5 server. (I had downloaded them both, but the Socks5 server compiled without errors, thus sealing my choice.) Within a day, I had figured out which settings I needed for my network and had the server running as a daemon.

Getting users excited about using the proxy server as opposed to direct Internet access is not easy. Recently, a user approached me ranting about how he could not stream video in from the Internet. After he calmed down, I asked him which URL he was trying to access. Then I quickly found a FAQ for the particular plug-in he was using with an entry similar to “How do I stream video through a firewall.” After reading the FAQ and looking at the available options, I found that this particular plug-in did not have Socks5 support. It did, however, have support for general HTTP proxying. So, I turned my attention back to the TIS fwtk I had abandoned 10 months before. I found a newer version, applied the http-gw patch, executed gmake and had the toolkit running later that day. The video streaming worked beautifully.

This story illustrates the fact that you do not have to make an either/or decision about Socks5 or the TIS firewall toolkit. The two packages can be used together to give your users a wide variety of Internet access.


Setting up a proxy server is a great way to give your users Internet access while still protecting your network from Internet attacks. Between both the Socks5 server and the TIS firewall toolkit, you can give your users as much or as little Internet access as you want.


Peter Elton has a BS degree in Computer Science from UNLV. When his pupils are not glazed over from viewing a monitor too long, he enjoys sailing, offroading and spending time with his wife and two kids. He can be reached at



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

i configure squid proxy

Anonymous's picture

i configure squid proxy server, it work propely but my client could not able to download more than 20mb size video file. please help me and give me a solution.

Anonymous's picture

about proxy through squid

reena ahuja's picture

i configure linux proxy server through squid.but i install windows XP in my client pc.
And 1 error comes access denied.i configure proper ACl in please solve my problem as early as possible.

linx as web server

Anonymous's picture

we want to setup a linux web server with clients windows. Kindly advise us ,
If the modem ip assigned is
then will it work this way
etho – which is connected to modem (the external card) –
Default gateway -
eth1 – which is connected to network (motherboard card) –
eth1:1 – which is virtual lan -
Default gateway – for eht1 & eth1:1

& the windows xp ip will be 192.168.6.x
with default gateway as192.168.6.1
& in internet explorer tools  internet options  connections  with port 3128


Anonymous's picture

It became useful first to distinguish among different kinds of IP vpn based on the administrative relationships, not the technology, interconnecting the nodes. Once the relationships were defined, different technologies could be used, depending on requirements such as security and quality of service.

Re: Linux as a Proxy Server

Anonymous's picture

the solution was good. but iam using squid as my proxy server so icouldn,t get benifitted. if you can sent me some ideas about squid i would be really thankfull.


Squid with Firewall

Rayudu's picture

Please use Shorewall as your firewall. This is basically a iptables wraper software making the deadly iptables easier. You can drop all the Ipnos you do't want. They will not reach your server more so your squid.

With best Wishes,

Rayudu, Machilipatnam, India.