OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Web Proxy Filtering and Caching (Moderator: fabian) »
  • Nginx reverse proxy will get "broken header"
« previous next »
  • Print
Pages: [1]

Author Topic: Nginx reverse proxy will get "broken header"  (Read 5246 times)

akong77

  • Newbie
  • *
  • Posts: 41
  • Karma: 0
    • View Profile
Nginx reverse proxy will get "broken header"
« on: November 04, 2020, 02:54:44 am »
Hello,
I has setup nginx reverse proxy all done.It's can success to browsers it.
But if I enable OPNSense -- Service -- nginx -- HTTP Server Proxy Protocol and Real IP.It's can't see web page.The Opnsense nginx log will show

Quote
2020/11/04 09:38:24 [error] 36521#100138: *10 broken header: "GET / HTTP/1.1
Host: ab.aspa.idv.tw
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:82.0) Gecko/20100101 Firefox/82.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Language: zh-TW,zh;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: keep-alive
Cookie: tk_or=%22%22; tk_lr=%22%22; _ga=GA1.3.660938322.1583392563; __gads=ID=9f57df3da7e19b8a-22892d044cc40098:T=1603244370:RT=1603244370:S=ALNI_MZFwjrtEaJJTdt4YXsnxyXVPR0Jcw
Upgrade-Insecure-Requests: 1

" while reading PROXY protocol, client: 203.74.122.103, server: 0.0.0.0:80
Could I miss some setup?
Logged

akong77

  • Newbie
  • *
  • Posts: 41
  • Karma: 0
    • View Profile
Re: Nginx reverse proxy will get "broken header"
« Reply #1 on: November 04, 2020, 05:37:07 am »
I hope know if I want web server can show real IP.How to do it?
Logged

fabian

  • Moderator
  • Hero Member
  • *****
  • Posts: 2769
  • Karma: 200
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: Nginx reverse proxy will get "broken header"
« Reply #2 on: November 04, 2020, 07:15:25 pm »
Maybe real IP and trusted proxy in combination is what you look for.
Logged

akong77

  • Newbie
  • *
  • Posts: 41
  • Karma: 0
    • View Profile
Re: Nginx reverse proxy will get "broken header"
« Reply #3 on: November 05, 2020, 02:49:08 am »
The Trust Proxy mean really web server?
Logged

fabian

  • Moderator
  • Hero Member
  • *****
  • Posts: 2769
  • Karma: 200
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: Nginx reverse proxy will get "broken header"
« Reply #4 on: November 08, 2020, 01:00:42 pm »
The trusted proxy is a previous proxy from which the real IP address is accepted.
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Web Proxy Filtering and Caching (Moderator: fabian) »
  • Nginx reverse proxy will get "broken header"
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2