I have a Debian server with two Ethernet ports. Relevant part of /etc/network/interfaces:I have a service running (specifically, Home Assistant on port 8123) that I want to reverse proxy with nginx. My nginx config:However, nginx makes connections from enp2s0's IP address, rather than 192.168.1.1. I tried to reproduce the problem in a VM with a similar network setup, but in the VM proxy_bind works correctly. Any ideas how I can debug why nginx is ignoring proxy_bind?
Code:
allow-hotplug enp2s0iface enp2s0 inet dhcpallow-hotplug enp3s0iface enp3s0 inet static address 192.168.1.1/24
Code:
server { server_name <dns name>; listen 443 ssl; listen [::]:443 ssl; ssl_certificate <path to cert> ssl_certificate_key <path to key> location / { proxy_pass http://192.168.1.1:8123/; proxy_bind 192.168.1.1; proxy_set_header X-Forwarded-For $remote_addr; }}
Statistics: Posted by madanra — 2025-01-29 21:12 — Replies 0 — Views 29