X-Forwarded-For Question
8 posts
• Page 1 of 1
- Beta_Tester
- Posts: 5
- Joined: 12 Jun 2012, 11:39
X-Forwarded-For Question
Hi,
I am looking for a product which will allow us to utilise the X-Forwarded-For header for inbound web requests on our Forefront TMG array (we utilise the same servers for reverse and forward proxy).
I have installed a trial version of ISAPI Rewrite and edited httpd.ini file to include the following additional entries:-
RewriteCond %REMOTE_ADDR (.+)
RewriteHeader X-Forwarded-For: (?!.).* $1
However, this will provide the X-Forwarded-For header for outbound web requests as well as inbound - we have been asked to restrict this to inbound requests only.
Any ideas???
Thanks very much!!!!
I am looking for a product which will allow us to utilise the X-Forwarded-For header for inbound web requests on our Forefront TMG array (we utilise the same servers for reverse and forward proxy).
I have installed a trial version of ISAPI Rewrite and edited httpd.ini file to include the following additional entries:-
RewriteCond %REMOTE_ADDR (.+)
RewriteHeader X-Forwarded-For: (?!.).* $1
However, this will provide the X-Forwarded-For header for outbound web requests as well as inbound - we have been asked to restrict this to inbound requests only.
Any ideas???
Thanks very much!!!!
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: X-Forwarded-For Question
Hello,
there're several additional questions to you:
a) Is it ISAPI_Rewrite 2 or 3? httpd.ini is supported only be v2, not 3. While this topic is in v3.
b) Hsve you installed ISAPI_Rewrite on TMG or IIS?
Regards
Andrew
there're several additional questions to you:
a) Is it ISAPI_Rewrite 2 or 3? httpd.ini is supported only be v2, not 3. While this topic is in v3.
b) Hsve you installed ISAPI_Rewrite on TMG or IIS?
Regards
Andrew
- Beta_Tester
- Posts: 5
- Joined: 12 Jun 2012, 11:39
Re: X-Forwarded-For Question
Sorry for posting this in the wrong forum. The version I am testing is actually version 2, as I am using the ISA/TMG version of the product.
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: X-Forwarded-For Question
Well, correct we if I'm wrong...
This rule works for you, but 2 ways, while you need to make it work only one way.
So my guess is that we need to add another condition to narrow it down.
Regards
Andrew
This rule works for you, but 2 ways, while you need to make it work only one way.
So my guess is that we need to add another condition to narrow it down.
Regards
Andrew
- Beta_Tester
- Posts: 5
- Joined: 12 Jun 2012, 11:39
Re: X-Forwarded-For Question
Hi,
Yes, that is correct. I am trying to work out what the condition would be to implement this...
Thanks v. much.
Yes, that is correct. I am trying to work out what the condition would be to implement this...
Thanks v. much.
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: X-Forwarded-For Question
We've researched TMG variables and found the following:
I think this could be a clue, just not sure which value would you need...
Regards
Andrew
- Code: Select all
IS_REVERSE_PROXY
A string containing TRUE or FALSE, indicating if the request is a forward proxy or reverse proxy request.
I think this could be a clue, just not sure which value would you need...
Regards
Andrew
- Beta_Tester
- Posts: 5
- Joined: 12 Jun 2012, 11:39
Re: X-Forwarded-For Question
Hi,
I have now tried to implement this by putting the following into the httpd.ini file:-
RewriteCond %IS_REVERSE_PROXY (True)
RewriteCond %REMOTE_ADDR (.+)
RewriteHeader X-Forwarded-For: (?!.).* $1
Unfortunately this doesn't work. I have tried values of true and false and neither of them work.
If I take the first RewriteCond line out, it works fine.
Any ideas?????
Thanks!
I have now tried to implement this by putting the following into the httpd.ini file:-
RewriteCond %IS_REVERSE_PROXY (True)
RewriteCond %REMOTE_ADDR (.+)
RewriteHeader X-Forwarded-For: (?!.).* $1
Unfortunately this doesn't work. I have tried values of true and false and neither of them work.
If I take the first RewriteCond line out, it works fine.
Any ideas?????
Thanks!
- Beta_Tester
- Posts: 5
- Joined: 12 Jun 2012, 11:39
Re: X-Forwarded-For Question
Beta_Tester wrote:Hi,
I have now tried to implement this by putting the following into the httpd.ini file:-
RewriteCond %IS_REVERSE_PROXY (True)
RewriteCond %REMOTE_ADDR (.+)
RewriteHeader X-Forwarded-For: (?!.).* $1
Unfortunately this doesn't work. I have tried values of true and false and neither of them work.
If I take the first RewriteCond line out, it works fine.
Any ideas?????
Thanks!
Worked it out in the end. I had to use a different TMG variable:-
RewriteCond %REVERSE_PROXY 1
8 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 19 guests