Markus Blog What’s going on Internet?

20Jan/0983

Squid Transparent Proxy Server on Windows Server 2003

In this article I’ll talk on how to setup a transparent proxy on Windows Server 2003 using Squid NT. Squid NT is a port from Linux base proxy server called Squid. I have successfully installed and configured Squid transparent proxy on Windows Server and here is how I do it.

Installing Squid NT is very easy, first you can download Squid NT here, and then you can follow my old tutorial here: http://markus.revti.com/2007/06/installing-squid-cache-for-windows/

Although installing Squid NT is easy, however configuring transparent proxy on Windows version of Squid is a bit tricky as Squid NT have its limitation. From Squid NT website it’s stated: “Transparent Proxy: missing Windows non commercial interception driver”.

My first thought was there is no way to do port forwarding or port redirecting in Windows Server the same way it is done in Linux server. In Linux based server you can use iptables to do port forwarding with the command like this:

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128

I’ve been looking for a way to do port redirect or port forwarding in Windows Server 2003 this several days and start to become desperate as not much info I can get on this topic. At first I was looking for doing port forwarding or port redirecting in RRAS (Routing and Remote Access Service) but can’t find it. Actually there is port forwarding in RRAS but it’s not what I need to make transparent proxy.

Then I start looking for software that can do port forwarding and found Softperfect Bandwidth Manager can do it. You can download Softperfect Bandwidth Manager here.

Step by step to configure transparent proxy using Softperfect Bandwidth Manager:

Let start by installing the Squid NT, use my old tutorial here http://markus.revti.com/2007/06/installing-squid-cache-for-windows/ to guide you.

Then you'll need to modify the squid.conf to add "transparent" keyword behind http_port options so it will look like this:

http_port 3128 transparent

Install Softperfect Bandwidth Manager

Create a Port Map, here you should define the Squid’s port on your server. Go to “Tools > Port Mapping”

Softperfect Bandwidth Manager's Add Port Map

Softperfect Bandwidth Manager's Add Port Map

Click on New button to create a new mapping, fill like the example below

Softperfect Bandwidth Manager Adding New Port Map

Softperfect Bandwidth Manager Adding New Port Map

After you create a port map, you need to create a new rule to redirect all HTTP request to remote server port 80 to port 3128. Click on “Rules > Add Rule”. On General tab fill the fields with these values:

Direction: Both
Transfer Rate Limit: Unlimited
Protocol: TCP and UDP
Apply Rule on Interface: LAN

Softperfect Bandwidth Manager Rule General Tab

Softperfect Bandwidth Manager Rule General Tab

Important! You must select the interface (Network Card) that is connected to your Local Network (the one that connect the server to other client computers, and NOT the one connected to the modem, etc.)

On Source tab set the values to these:

Source Address: Whole IP Address, and insert the IP ranges of your clients PC
Source Port: Any

Softperfect Bandwidth Manager Source Tab

Softperfect Bandwidth Manager Source Tab

On Destination tab set the values to these:

Destination Address: Any IP Address
Destination Port: Port List and then Add these ports: 80 (HTTP) and 443 (HTTPS)

Softperfect Bandwidth Manager Destination Tab

Softperfect Bandwidth Manager Destination Tab

On Advanced tab look for “Additional Processing”, give check on “Process through the following mapping” and select the port mapping you created before and click OK.

Softperfect Bandwidth Manager Advanced Tab

Softperfect Bandwidth Manager Advanced Tab

Done, now all requests to port 80 and 443 will be redirected to Squid NT. To check whether the transparent proxy works or not you can visit http://whatismyipaddress.com/ and it should say “Proxy Server Detected!”

Download Squid NT and Softperfect Bandwidth Manager here

Bookmark and Share

Related Article

Comments (83) Trackbacks (6)
  1. how i will active Squid + Softperfect Bandwidth Manager for webcams support?

    • what problem do you encounter? squid + softperfect shouldn’t be have anything to do with webcam, unless the software need a port to be opened to transfer the video, in this case you have to ask the software provider what ports they use.

  2. i try to install a transparent proxy under windows xp professional.

    i made all steps.. but it\’s only work if i set the proxu setting in the internet explorer 8

    if i set the port 3128 or port 80 work\’s fine.. but in transparent mode no..

    any idea?

    • do you have firewall installed?

      does the win xp is the internet gateway on your network? the pc which you install the squid proxy server + Softperfect Bandwidth Manager must be the internet gateway other wise it won’t work.

  3. Hey Buddy, tanks for the tuto.

    I have a problem, when i try to open secure web pages (https) my connection fail.
    can you helpme with this?

  4. Hi, i have windows 2003 enterprice, squid 2.7 stable6 and softperfect, i try to install a transparent proxy but made all steps but it’s only work if i set the proxy setting in the internet explorer in transparent mode not work, my win 2003 have two cards, but, if i set the web page ip address work. any idea??

    • “web page ip address work”

      if you can access website by its ip address and not by domain name, it probably the DNS setting on squid.conf is not configured yet.

      does all client use the windows 2003 server as gateway? on client pc, check “Local Area Connection Status”, the field “Default Gateway” must point to the windows 2003 ip address

  5. Markus can you post new actualized post because you r the only one page of transparent proxy over windows on google!

  6. I came across this artical and had few questions. Is it possible to change this program to authenticate against a database? for example, a database consists of username / password. Only people who have correctly authenticated can access internet.

    My last question is, is it possible to run transparent proxy on Windows Vista or Windows 7 computer?

    Thanks

  7. I did everything exactly described in this topic but couldn’t have the transparent proxy working….
    I will describe in detail about the steps I did

    The computer which must be configured as Squid server and transparent proxy has Windows XP SP2…..
    I have one LAN Card and its IP address is 192.168.0.100…
    I have installed Squid successfully which listens in port 3128 with “http_port 3128 transparent” in squid.conf….
    SBM installed successfully and configured exactly as the same way it was instructed….
    Squid is running successfully…. I have tested in one Client PC by setting browser Proxy setting to 192.168.0.100:3128…. websites are being fetched successfully….

    but when I remove the proxy setting then websites are not being fetched…

    Client computer’s IP address is 192.168.0.101
    net mask 255.255.255.0
    gateway 192.168.0.100
    dns 192.168.0.100

    is this the correct setting or not….

    transparent proxy not working please help………

  8. I did everything exactly described in this topic but couldn’t have the transparent proxy working….
    I will describe in detail about the steps I did

    The computer which must be configured as Squid server and transparent proxy has Windows XP SP2…..
    I have one LAN Card and its IP address is 192.168.0.100…
    I have installed Squid successfully which listens in port 3128 with “http_port 3128 transparent” in squid.conf….
    SBM installed successfully and configured exactly as the same way it was instructed….
    Squid is running successfully…. I have tested in one Client PC by setting browser Proxy setting to 192.168.0.100:3128…. websites are being fetched successfully….

    but when I remove the proxy setting then websites are not being fetched…

    Client computer’s IP address is 192.168.0.101
    net mask 255.255.255.0
    gateway 192.168.0.100
    dns 192.168.0.100

    is this the correct setting or not….

    transparent proxy not working please help………

    and I forgot to mention that in the Squid PC I connect to the internet using ADSL MODEM configured at bridge mode… so I have created a dial up broadband connection…. and I connect to the internet using this dial up broadband connection…..

  9. if you can browse with manual proxy setting, then your squid is installed correctly. so there must be something wrong with the Softperfect Bandwidth Manager settings.

    what ip address did you put in on “Softperfect Bandwidth Manager Source Tab” see above image to check which window i meant.

  10. https not working in transparent mode.
    When i enter 443 in softperfect to forward to squid then secure webs do not open.

  11. Hi, im newbie and have install squid and Softperfect Bandwidth Manager but can’t understant how to configure to use it in my network. In Server work but not in others computers.

    thanks


Leave a comment


*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word


Sideblog feed

  • Mozilla Released Thunderbird 3 9 December 2009
    The long waited open source email client Thunderbird 3 is now released! Upgrading from Thunderbird 2 to Thunderbird 3 is very easy and almost automatically. Once you finished installing version 3, you. […]
  • Microsoft Wireless Comfort Desktop 5000 Keyboard and Mouse 22 October 2009
    The Microsoft Wireless Comfort Desktop 5000 has been designed to enhance your Windows 7 experience. You can easily access programs in the task bar with convenient hot keys. Applications in the taskbar. […]
  • WooFunction: 178 Amazing Web Design Icons 28 September 2009
    The WooFunction Icon Set includes 178 amazing web-related icons in a sophisticated and glossy design style. All 178 icons are available as 32×32 pixel PNG files and we can assure you that they are in. […]
  • Moblin the Next Generation OS for Netbook 27 September 2009
    Moblin is an open source project that supports Linux-based software platform and is optimized for the next generation of mobile devices including netbooks, mobile Internet devices (MIDs), in-vehicle i. […]
  • Twitterify Your Wordpress Blog Using P2 Theme 21 September 2009
    Twitter is becoming more and more popular due to its requirement as micro blogging is not much, only 140 characters that even less than a text message limit which is 160 characters. Blogger that is no. […]