Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to Forward Traffic to Home Assistant VM via Nginx Proxy Manager on TrueNAS Scale #4219

Open
rrterrorr opened this issue Dec 9, 2024 Discussed in #4213 · 2 comments

Comments

@rrterrorr
Copy link

Discussed in #4213

Originally posted by rrterrorr December 8, 2024
Hello,

I am currently running a TrueNAS Scale server with several Docker apps, including Nginx Proxy Manager (NPM). All of my Docker apps are working fine with NPM, and I can access them without issues. However, I also have a Home Assistant VM on the server (on a different IP but within the same subnet), and I am unable to forward traffic to it via NPM.

The network configuration on TrueNAS is set to BR1, and all apps and VMs, including the Home Assistant VM, are running on this network. My goal is to forward traffic to the Home Assistant VM so that I can eventually stop using Nabu Casa for remote access.

I’ve tried setting up the proxy for Home Assistant in NPM, but the forwarding doesn’t seem to work. I’m looking for advice on how to set up the correct routing or port forwarding for this VM through NPM.

Has anyone encountered this issue or can provide guidance on how to achieve this setup?

Thanks in advance for any help!

@shalafi99
Copy link

shalafi99 commented Dec 9, 2024

Hi, I am not familiar with TrueNAS Scale or use Home Assistant, but willing to give it a go...

What kind of error is returned, if any, when you try to connect to that proxy host?
Did you try a 'curl' from within the NPM container to the Home Assistant's URL, what happened there?

From your description, I understood you have included the Home Assistant IP (or its FQDN, which would be resolvable by DNS inside that subnet) as the "Forward Hostname / IP" inside that NPM proxy host, plus the protocol (http or https) Home Assistant is listening with and the corresponding TCP port for that.

@rrterrorr
Copy link
Author

rrterrorr commented Dec 10, 2024

All the info:
image
homeassistant network info:
image
Nginx Proxy Manager proxy host:
image
Home Assistant OS (vm)
curl response Container Shell:

`# curl 192.168.10.10:8123
<!DOCTYPE html><html><head><title>Home Assistant</title><meta charset="utf-8"><link rel="manifest" href="/manifest.json" crossorigin="use-credentials"><link rel="icon" href="/static/icons/favicon.ico"><link rel="modulepreload" href="/frontend_latest/core.1f73e71d1e4a69f9.js" crossorigin="use-credentials"><link rel="modulepreload" href="/frontend_latest/app.e47980f03870f216.js" crossorigin="use-credentials"><link rel="mask-icon" href="/static/icons/mask-icon.svg" color="#18bcf2"><link rel="apple-touch-icon" href="/static/icons/favicon-apple-180x180.png"><meta name="apple-itunes-app" content="app-id=1099568401"><meta name="apple-mobile-web-app-capable" content="yes"><meta name="apple-mobile-web-app-status-bar-style" content="default"><meta name="apple-mobile-web-app-title" content="Home Assistant"><meta name="msapplication-config" content="/static/icons/browserconfig.xml"><meta name="mobile-web-app-capable" content="yes"><meta name="application-name" content="Home Assistant"><meta name="referrer" content="same-origin"><meta name="theme-color" content="#03A9F4"><meta name="color-scheme" content="dark light"><meta name="viewport" content="width=device-width,user-scalable=no,viewport-fit=cover,initial-scale=1"><style>body{font-family:Roboto,Noto,Noto Sans,sans-serif;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-weight:400;margin:0;padding:0;height:100%}</style><style>html{background-color:var(--primary-background-color,#fafafa);color:var(--primary-text-color,#212121);height:100vh}@media (prefers-color-scheme:dark){html{background-color:var(--primary-background-color,#111);color:var(--primary-text-color,#e1e1e1)}}#ha-launch-screen{height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center}#ha-launch-screen svg{width:112px;flex-shrink:0}#ha-launch-screen .ha-launch-screen-spacer-top{flex:1;margin-top:calc(2 * max(env(safe-area-inset-bottom),48px) + 46px);padding-top:48px}#ha-launch-screen .ha-launch-screen-spacer-bottom{flex:1;padding-top:48px}.ohf-logo{margin:max(env(safe-area-inset-bottom),48px) 0;display:flex;flex-direction:column;align-items:center;opacity:.66}@media (prefers-color-scheme:dark){.ohf-logo{filter:invert(1)}}</style></head><body><div id="ha-launch-screen"><div class="ha-launch-screen-spacer-top"></div><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240"><path fill="#18BCF2" d="M240 224.762a15 15 0 0 1-15 15H15a15 15 0 0 1-15-15v-90c0-8.25 4.77-19.769 10.61-25.609l98.78-98.7805c5.83-5.83 15.38-5.83 21.21 0l98.79 98.7895c5.83 5.83 10.61 17.36 10.61 25.61v90-.01Z"/><path fill="#F2F4F9" d="m107.27 239.762-40.63-40.63c-2.09.72-4.32 1.13-6.64 1.13-11.3 0-20.5-9.2-20.5-20.5s9.2-20.5 20.5-20.5 20.5 9.2 20.5 20.5c0 2.33-.41 4.56-1.13 6.65l31.63 31.63v-115.88c-6.8-3.3395-11.5-10.3195-11.5-18.3895 0-11.3 9.2-20.5 20.5-20.5s20.5 9.2 20.5 20.5c0 8.07-4.7 15.05-11.5 18.3895v81.27l31.46-31.46c-.62-1.96-.96-4.04-.96-6.2 0-11.3 9.2-20.5 20.5-20.5s20.5 9.2 20.5 20.5-9.2 20.5-20.5 20.5c-2.5 0-4.88-.47-7.09-1.29L129 208.892v30.88z"/></svg><div id="ha-launch-screen-info-box" class="ha-launch-screen-spacer-bottom"></div><div class="ohf-logo"><img src="/static/images/ohf-badge.svg" alt="Home Assistant is a project by the Open Home Foundation" height="46"></div></div><home-assistant></home-assistant><script>function _ls(d,e){var o=document.createElement("script");return e&&(o.crossOrigin="use-credentials"),o.src=d,document.head.appendChild(o)}window.polymerSkipLoadingFontRoboto=!0,"customElements"in window&&"content"in document.createElement("template")||_ls("/static/polyfills/webcomponents-bundle.js",!0);var isModern=/Edge?\/(12\d|1[3-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Firefox\/(1{2}[5-9]|1[2-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Chrom(ium|e)\/(109|1[1-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|(Maci|X1{2}).+ Version\/(17\.([2-9]|\d{2,})|(1[89]|[2-9]\d|\d{3,})\.\d+)([,.]\d+|)( \(\w+\)|)( Mobile\/\w+|) Safari\/|Chrome.+OPR\/(10[6-9]|1[1-9]\d|[2-9]\d{2}|\d{4,})\.\d+\.\d+|(CPU[ +]OS|iPhone[ +]OS|CPU[ +]iPhone|CPU IPhone OS|CPU iPad OS)[ +]+(15[._]([6-9]|\d{2,})|(1[6-9]|[2-9]\d|\d{3,})[._]\d+)([._]\d+|)|Android:?[ /-](12\d|1[3-9]\d|[2-9]\d{2}|\d{4,})(\.\d+|)(\.\d+|)|Mobile Safari.+OPR\/([89]\d|\d{3,})\.\d+\.\d+|Android.+Firefox\/(12[1-9]|1[3-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|Android.+Chrom(ium|e)\/(12\d|1[3-9]\d|[2-9]\d{2}|\d{4,})\.\d+(\.\d+|)|SamsungBrowser\/(2[4-9]|[3-9]\d|\d{3,})\.\d+|Home As{2}istant\/[\d.]+ \(.+; macOS (1[2-9]|[2-9]\d|\d{3,})\.\d+(\.\d+)?\)/.test(navigator.userAgent)&&"findLast"in Array.prototype</script><script>if(-1===navigator.userAgent.indexOf("Android")&&-1===navigator.userAgent.indexOf("CrOS")){function _pf(o,t){var n=document.createElement("link");n.rel="preload",n.as="font",n.type="font/woff2",n.href=o,n.crossOrigin="anonymous",document.head.appendChild(n)}_pf("/static/fonts/roboto/Roboto-Regular.woff2"),_pf("/static/fonts/roboto/Roboto-Medium.woff2")}</script><script crossorigin="use-credentials">isModern&&(import("/frontend_latest/core.1f73e71d1e4a69f9.js"),import("/frontend_latest/app.e47980f03870f216.js"),window.customPanelJS="/frontend_latest/custom-panel.85696341b06275a4.js",window.latestJS=!0)</script><script>import("/browser_mod.js");import("/hacsfiles/Bubble-Card/bubble-pop-up.js?v=0.0.0");import("/local/card-mod.js");import("/hacsfiles/Bubble-Card/bubble-pop-up-fix.js");import("/hacsfiles/hass-hue-icons/hass-hue-icons.js");import("/hacsfiles/lovelace-card-mod/card-mod.js?hacstag=190927524342");import("/hacsfiles/iconset.js");import("/hacsfiles/LG-WebOS-Remote-Control/lg-remote-control.js");</script><script>window.latestJS||(window.customPanelJS="/frontend_es5/custom-panel.e9925f0c3683266e.js",_ls("/frontend_es5/core.7cf8e444389d2c91.js",!0),_ls("/frontend_es5/app.3493c8ad76076624.js",!0))</script><script>if (!window.latestJS) {}</script></body></html># 
`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants