Tuesday, January 10, 2012

Transparent proxy on Windows

Requirement

* Internal DNS server [ we can use router IP (192.168.1.1) ]
* Bandwidth Manager
* Enabling TCP/IP Forwarding (Restart machine after enabling routing )

Step 1# Install Softperfect Bandwidth Manager

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























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























Step 4# 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 8080. Click on “Rules > Add Rule”. On General tab fill the fields with these values:
Direction: Both
Transfer Rate Limit: Unlimited
Protocol: TCP
Apply Rule on Interface: LAN

























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.)
* IP Address of the server should not be within the range of these 

Step 5# 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
























Step 6# On Destination tab set the values to these:
Destination Address: Any IP Address
Destination Port: Port List and then Add these ports: 80 (HTTP)
You cannot redirect port 443

"Long answer: SSL is specifically designed to prevent "man in the middle" attacks,
and setting up safesquid in such a way would be the same as such a "man in the middle" attack.
You might be able to successfully achive this, but not without breaking the encryption and certification that is the point behind SSL".


























Step 7# 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.
























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


Client side settings/troubleshooting 

* First check nslookup for any domain
* In client machine the  Gateway ip should be Proxy Server IP






0 comments:

Post a Comment

Note: Only a member of this blog may post a comment.