About this question
What are the differences between X-Forwarded-For IP and X Real IP and VPNs and Tor. What is the point of spoofing X-Forwarded-For IP when it just tells the originating IP despite the fact that I have changed it many times?
What are the differences between X-Forwarded-For IP and X Real IP and VPNs and Tor. What is the point of spoofing X-Forwarded-For IP when it just tells the originating IP despite the fact that I have changed it many times?
Log in to share your answer and help other learners.
Log in to answerBest Answer · By JanBask MS SQL Server Expert
Ankur Vaish JanBask Expert
Answered on Jan 3, 2022
X-Forwarded-For header may be used to forward client's X real IP in case of source NAT. But not all applications use them.
This header is often inserted by load-balancers or reverse-proxies, depending on the architecture in place, when the application needs to know the real IP belonging to a client. When this header is inserted, the application can see 2 IPs: Source IP used in TCP/IP connection IP set in X-Forwarded-For header
Setting this header does not hide your real IP (as it is still used in TCP/IP connection) but can trick applications using it. However as you were able to see, not all applications are using it. With TOR and VPN, this is the IP used in TCP/IP connection which is modified by (respectively) your exit node/your VPN gateway. However, they don't (and should not) operate at application layer, and they don't (and shouldn't be able to) insert the X-Forwarded-For HTTP header, thus your real IP is hidden.
Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.
Step-by-step SQL Server guides from industry experts
Common SQL Server interview questions, answered
Guides, tips and career advice on SQL Server from JanBask experts.
SQL Server Top 75 SSAS Interview Questions and Answers For Beginners & Experts
Prepare for your SSAS interview with our comprehensive guide featuring 75 top SQL Server Analysis Services interview questions…
SQL Server How to Become a SQL Database Administrator?
How to become a sql database administrator In 2025, discover what these professionals do, explore how much they earn and learn…
SQL Server OLAP vs OLTP: Key Differences, Architectures, Performance & Real-World Examples
Compare OLTP vs OLAP with clear definitions, architecture diagrams, real-world examples, and FAQs. Learn when to use each system…
SQL Server 70+ Most Asked SSIS Interview Questions for Freshers & Experienced
Prepare for your next SQL Server Integration Services (SSIS) interview with our top 70+ SSIS interview questions and answers.…