Redirecting http requests from new users to a local site

Started by Pierro

i am trying to redirect http requests of new users of my network to a local site on the pc with BWM installed. I did everything the help document says
Unfortunately, after everything, only internet explorer was redirected.Opera and firefox weren't. they give a reply that it is a never ending request.
IE however works one moment and the next moment it doesn't.

the rules i created are as follows

Rule name: redirect
Transfer rate: unlimited
Protocol: (tried TCP alone and TCP and UDP)
interface: (tried all interfaces: Any interface; LAN (local conn.); LAN2 (internet conn) and WAN
Source IP: 192.168.0.0 - 192.168.0.255
Destination: Any IP on port 80

i created a port map to redirect http requests to a local webpage created on the pc with IIS
on the advance tab i checked the "process through the following maping" box and selected the map i created.

i have a block rule after this rule. But its not working as it should.
the block rule is:

Rate: Blocked
Source: 192.168.0.0 - 192.168.0.255
Destination: Any IP address
Protocol: TCP
Interface: LAN
Pleeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeease HELP:S
SoftPerfect Support forum - Andrew avatar image

Re: Redirecting http requests from new users to a local site   06 January 2009, 12:41

Well, the software is not entirely foolproof smile I assume the IIS web-server is installed on the same computer with BWM. It seems the web-browsers end-up with an infinite redirection loop.

Here's why:

1. A client 192.168.0.x is trying to access Google, for example.
2. His request is coming through BWM and is being trapped by the "Redirect" rule.
3. BWM is replying with a HTTP reply 302 and redirected the client to the local web-site
4. If the local web-site sits on the BWM computer, the newly initiated request (due to the redirection) is coming through BWM again, and then steps 2 to 4 run infinitely.

Solution:

If the above is the case, make your rule as follows:
Rule name: Redirect 
Transfer rate: Unlimited 
Protocol: TCP
interface: LAN (local conn.)
Source IP: 192.168.0.0 - 192.168.0.255 
Destination: Not local on port 80
In order to input Not local, simply specify 'Local host' at the Destination tab, and then check 'Invert destination address' at the Advanced tab. Link this rule with the port mapping.

Update: I just forgot to mention that you will also have to add a rule explicitly allowing connections to the local host port 80, otherwise the blocking rule at the end will reject the redirection. So, add one more rule (not linked to a port mapping) above the "Redirect" rule:
Rule name: Redirect 
Transfer rate: Unlimited 
Protocol: TCP
interface: LAN (local conn.)
Source IP: 192.168.0.0 - 192.168.0.255 
Destination: Local on port 80
hillcountry

redirecting web request   06 January 2010, 15:45

Andrew:

I don't understand what you are suggesting...
Typically the web site to be redirected to is NOT on the BWM PC. So if I want 192.168.1.100 ( a customer behind my firewall ) to have his port 80 web request ( to any external web site ) to be redirected to a web server on 192.169.1.200
What rules do I set up? Is there an actual "redirection" rule -- or you just suggesting calling (naming) the rule "redirection" or "redirect".

Is this type redirection really a function that I can do with the latest production release?

rick
SoftPerfect Support forum - Andrew avatar image

redirecting web request   06 January 2010, 18:17

Hi Rick, this depends on which side of the BWM PC the web-server is.

a) If the web-site is on the customer side, so he can access the web-server without going through the BWM PC, then this can be done with a simpler rule. Define a port mapping as shown below and a corresponding rule:

SoftPerfect support forum

Rule:
Protocol: TCP
Source: 192.168.1.100 : any port
Destination: Any address: port 80
Advanced: process through the mapping "Redirect to my web-server"
Interface: LAN


This merely instructs BWM to reroute a HTTP request from the user and reply with HTTP code 302, taking him to the URL specified in the mapping. Finally the user's browser makes a HTTP request to 192.169.1.200 and receives whatever content you put there.

b) If the web-site is on the other side of the BWM PC, so accessing 192.169.1.200 is only possible through the BWM PC, things get slightly more complex. You need to add an exception in the rule, to make requests to 192.169.1.200 itself not redirected. Otherwise, you will end up with an infinite loop. Therefore, we need to make the rule as follows:

Rule:
Protocol: TCP
Source: 192.168.1.100 : any port
Destination: Not 192.169.1.200: port 80
Advanced: process through the mapping "Redirect to my web-server"
Interface: LAN

This rule is just like the first one, yet it ignores any requests to 192.169.1.200. In order to implement Not, enter 192.169.1.200 as the destination address and then on the advanced tab check Invert destination address.

Hope this helps. If anything remains unclear, please ask.

P.S. This thread could celebrate an anniversary, it is exactly one year old smile

Sometimes you can get the answer faster if you try the forum search and/or have a look at the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

 ********  ********    *******   **      **  **     ** 
    **     **     **  **     **  **  **  **  **     ** 
    **     **     **  **         **  **  **  **     ** 
    **     **     **  ********   **  **  **  **     ** 
    **     **     **  **     **  **  **  **   **   **  
    **     **     **  **     **  **  **  **    ** **   
    **     ********    *******    ***  ***      ***    

Message: