Solved

Allow X-Forwarded-For Headers to Site or No?

Posted on 2016-10-24
3
57 Views
Last Modified: 2016-10-25
So, this one is new for me and I need a breakdown on it.  I already Google'd about it but I want a answer from someone knowledgable in this matter.

We host multiple sites for clients.  The sites are on IIS servers behind a load balancer.  One of the sites we host is having issues when their customers try to access it behind a proxy.  They can access it when they disable "X-Forwarded-For" option on the proxy but can't access it when they enable.  

My question to you is should we enable it for these users?  I ready that hackers can use that option if they breach your network and can use it to spoof the IP they came in on.  So obviously for us this is a security issue.

I'm not even 100% sure where to enable this, I believe I would do it on the actual web server and not the firewall, but I need advice on the ramifications of if I do it to begin with.
0
Comment
Question by:cshepfam
3 Comments
 
LVL 77

Expert Comment

by:arnold
ID: 41857861
On a proxy configuration X-forwarded-For deals with when proxies are chained.

Without understanding your situation it is hard to answer your question
Depending on your loadbalancer, you could add the X-Forwarded-FOR to the loadbalancer.

Direct access client would not care about this header entry, the proxy may benefit..

Are their proxy chained? local proxy that connects to another of their proxy at HQ which in turns contacts your loadbalaner, passing data to the IIS instance, etc.
0
 
LVL 62

Accepted Solution

by:
btan earned 500 total points
ID: 41857873
Indeed the X-Forwarded-For (and User-Agent) HTTP headers can easily be spoofed by any user.

By default, to secure your site, it should reject any connections that are not from the IP of the proxy server (configure the web server or firewall to only accept the client IP of the proxy for web connections). That is likely why you have connection without enabling XFF header.

Also you should consider installing an SSL certificate onto the proxy, which each client machine can trust. This will enable the proxy server to decrypt traffic, add the appropriate IP address header (overwriting any set by the client) and then forward it onto your server. The server code can then safely check the XFF header to make sure it remains constant per user session.

HTTP header should not be used for any Access Control List (ACL) checks because it can be spoofed by attackers. Use the real IP address for this type of restrictions.
0
 
LVL 13

Author Closing Comment

by:cshepfam
ID: 41858824
Thank you for the explanation.  It was the one I was looking for.
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
slow vpn connection 9 41
logs for inetpub time stamps are off 1 14
IIS Authorization for Web Service 2 22
How to restore security permissions on a file server 4 41
This article explains in simple steps how to renew expiring Exchange Server Internal Transport Certificate.
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
A simple description of email encryption using a secure portal service. This is one of the choices offered by The Email Laundry for email encryption. The other choices are pdf encryption which creates an encrypted pdf of your email and any attachmen…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now