Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

DNS-to-HTTPS is causing the REMOTE_ADDR server variable to be incorrect

more options

I am a software developer for a Human Resource Information System (HRIS) called EnterpriseAxis. My HRIS software checks the IP address of each user to determine whether or not the user is on the company's LAN or VPN. However, there is a bug in Firefox that prevents this security feature from working.

The bug is in DNS-to-HTTPS. When this feature is enabled in Firefox, it changes the value of the REMOTE_ADDR server variable. Normally, when a VPN tunnel is active, REMOTE_ADDR contains the workstation's IP address, such as 192.168.11.6. However, when DNS-to-HTTPS is enabled, REMOTE_ADDR contains the router's WAN IP address, such as 96.91.16.207.

Please correct the issue.

I am a software developer for a Human Resource Information System (HRIS) called EnterpriseAxis. My HRIS software checks the IP address of each user to determine whether or not the user is on the company's LAN or VPN. However, there is a bug in Firefox that prevents this security feature from working. The bug is in DNS-to-HTTPS. When this feature is enabled in Firefox, it changes the value of the REMOTE_ADDR server variable. Normally, when a VPN tunnel is active, REMOTE_ADDR contains the workstation's IP address, such as 192.168.11.6. However, when DNS-to-HTTPS is enabled, REMOTE_ADDR contains the router's WAN IP address, such as 96.91.16.207. Please correct the issue.

被選擇的解決方法

I assume the HRIS server is on the LAN.

Firefox doesn't determine the IP address through which it accesses a web server. Your scenario suggests that the request is routing out through the firewall onto the public internet instead of staying within the LAN.

DNS-over-HTTPS (DoH) requests the HRIS server address from Cloudflare (or another provider) on the public internet. If the query fails, then Firefox should fall back to the local system for DNS. It sounds as though the customer may have public DNS configured for the hostname used by HRIS, in which case Firefox will obtain that public address and never learn the internal address.

If it is necessary to have an external DNS entry for this internal server, and the router cannot intercept the outbound Firefox request and keep it inside the LAN, I think your customers will need to manage their users' Firefox installations either by blocking DoH or by setting a hostname exception.

See:

https://support.mozilla.org/en-US/kb/dns-over-https-doh-faqs#w_how-does-firefox-handle-split-horizon-dns

To block DoH:

To exclude specific hostnames:

從原來的回覆中察看解決方案 👍 0

所有回覆 (2)

more options

HI John Bunch:

Please file a bug in bugzilla for this:

https://bugzilla.mozilla.org/enter_bug.cgi

Cheers!

..Roland

more options

選擇的解決方法

I assume the HRIS server is on the LAN.

Firefox doesn't determine the IP address through which it accesses a web server. Your scenario suggests that the request is routing out through the firewall onto the public internet instead of staying within the LAN.

DNS-over-HTTPS (DoH) requests the HRIS server address from Cloudflare (or another provider) on the public internet. If the query fails, then Firefox should fall back to the local system for DNS. It sounds as though the customer may have public DNS configured for the hostname used by HRIS, in which case Firefox will obtain that public address and never learn the internal address.

If it is necessary to have an external DNS entry for this internal server, and the router cannot intercept the outbound Firefox request and keep it inside the LAN, I think your customers will need to manage their users' Firefox installations either by blocking DoH or by setting a hostname exception.

See:

https://support.mozilla.org/en-US/kb/dns-over-https-doh-faqs#w_how-does-firefox-handle-split-horizon-dns

To block DoH:

To exclude specific hostnames: