<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>hi, sorry for the extreme delay... i was lazy.<br>
    </p>
    <p>Here's what happens when I connect to my server on IPv6 (mind
      you, everything works fine if I remove the AAAA record):<br>
    </p>
    <pre>2019/12/15 22:53:44 [crit] 15662#15662: *2225 bind(<my server's IPv6 address here>) failed (97: Address family not supported by protocol) while connecting to upstream, client: <my desktop's IPv6 address here>, server: domain.net, request: "GET /sonarr/plugins/bower_components/bootstrap-select/bootstrap-select.min.js HTTP/2.0", upstream: <a class="moz-txt-link-rfc2396E" href="http://192.168.136.135:8989/sonarr/plugins/bower_components/bootstrap-select/bootstrap-select.min.js">"http://192.168.136.135:8989/sonarr/plugins/bower_components/boots
trap-select/bootstrap-select.min.js"</a>, host: "domain.net", referrer: <a class="moz-txt-link-rfc2396E" href="https://domain.net/sonarr/">"https://domain.net/sonarr/"</a>
2019/12/15 22:53:44 [crit] 15662#15662: *2225 bind(<my server's IPv6 address here>) failed (97: Address family not supported by protocol) while connecting to upstream, client: <my desktop's IPv6 address here>, server: domain.net, request: "GET /sonarr/plugins/bower_components/tinymce/tinymce.min.js HTTP/2.0", upstream: <a class="moz-txt-link-rfc2396E" href="http://192.168.136.135:8989/sonarr/plugins/bower_components/tinymce/tinymce.min.js">"http://192.168.136.135:8989/sonarr/plugins/bower_components/tinymce/tinymce.min.js"</a>
, host: "domain.net", referrer: <a class="moz-txt-link-rfc2396E" href="https://domain.net/sonarr/">"https://domain.net/sonarr/"</a>
2019/12/15 22:53:44 [crit] 15662#15662: *2225 bind(<my server's IPv6 address here>) failed (97: Address family not supported by protocol) while connecting to upstream, client: <my desktop's IPv6 address here>, server: domain.net, request: "GET /sonarr/plugins/bower_components/multiselect/js/jquery.multi-select.js HTTP/2.0", upstream: <a class="moz-txt-link-rfc2396E" href="http://192.168.136.135:8989/sonarr/plugins/bower_components/multiselect/js/jquery.multi-select.js">"http://192.168.136.135:8989/sonarr/plugins/bower_components/multisel
ect/js/jquery.multi-select.js"</a>, host: "domain.net", referrer: <a class="moz-txt-link-rfc2396E" href="https://domain.net/sonarr/">"https://domain.net/sonarr/"</a>
2019/12/15 22:53:44 [crit] 15662#15662: *2225 bind(<my server's IPv6 address here>) failed (97: Address family not supported by protocol) while connecting to upstream, client: <my desktop's IPv6 address here>, server: domain.net, request: "GET /sonarr/plugins/bower_components/mousetrap/mousetrap.min.js HTTP/2.0", upstream: <a class="moz-txt-link-rfc2396E" href="http://192.168.136.135:8989/sonarr/plugins/bower_components/mousetrap/mousetrap.min.js">"http://192.168.136.135:8989/sonarr/plugins/bower_components/mousetrap/mousetrap
.min.js"</a>, host: "domain.net", referrer: <a class="moz-txt-link-rfc2396E" href="https://domain.net/sonarr/">"https://domain.net/sonarr/"</a>
2019/12/15 22:53:44 [crit] 15662#15662: *2225 bind(<my server's IPv6 address here>) failed (97: Address family not supported by protocol) while connecting to upstream, client: <my desktop's IPv6 address here>, server: domain.net, request: "GET /sonarr/plugins/bower_components/bootstrap-treeview-master/dist/bootstrap-treeview.min.js HTTP/2.0", upstream: <a class="moz-txt-link-rfc2396E" href="http://192.168.136.135:8989/sonarr/plugins/bower_components/bootstrap-treeview-master/dist/bootstrap-treeview.min.js">"http://192.168.136.135:8989/sonarr/plugins/bower_
components/bootstrap-treeview-master/dist/bootstrap-treeview.min.js"</a>, host: "domain.net", referrer: <a class="moz-txt-link-rfc2396E" href="https://domain.net/sonarr/">"https://domain.net/sonarr/"</a>
2019/12/15 22:53:44 [crit] 15662#15662: *2225 bind(<my server's IPv6 address here>) failed (97: Address family not supported by protocol) while connecting to upstream, client: <my desktop's IPv6 address here>, server: domain.net, request: "GET /sonarr/js/jquery.mousewheel.min.js HTTP/2.0", upstream: <a class="moz-txt-link-rfc2396E" href="http://192.168.136.135:8989/sonarr/js/jquery.mousewheel.min.js">"http://192.168.136.135:8989/sonarr/js/jquery.mousewheel.min.js"</a>, host: "domain.net", referrer: <a class="moz-txt-link-rfc2396E" href="https://domain.net/sonarr/">"http
s://domain.net/sonarr/"</a>
2019/12/15 22:53:44 [crit] 15662#15662: *2225 bind(<my server's IPv6 address here>) failed (97: Address family not supported by protocol) while connecting to upstream, client: <my desktop's IPv6 address here>, server: domain.net, request: "GET /sonarr/js/ua-parser.min.js HTTP/2.0", upstream: <a class="moz-txt-link-rfc2396E" href="http://192.168.136.135:8989/sonarr/js/ua-parser.min.js">"http://192.168.136.135:8989/sonarr/js/ua-parser.min.js"</a>, host: "domain.net", referrer: <a class="moz-txt-link-rfc2396E" href="https://domain.net/sonarr/">"https://domain.ne
t/sonarr/"</a>
2019/12/15 22:53:44 [crit] 15662#15662: *2225 bind(<my server's IPv6 address here>) failed (97: Address family not supported by protocol) while connecting to upstream, client: <my desktop's IPv6 address here>, server: domain.net, request: "GET /sonarr/js/plyr.js HTTP/2.0", upstream: <a class="moz-txt-link-rfc2396E" href="http://192.168.136.135:8989/sonarr/js/plyr.js">"http://192.168.136.135:8989/sonarr/js/plyr.js"</a>, host: "domain.net", referrer: <a class="moz-txt-link-rfc2396E" href="https://domain.net/sonarr/">"https://domain.net/sonarr/"</a>
2019/12/15 22:53:44 [crit] 15662#15662: *2225 bind(<my server's IPv6 address here>) failed (97: Address family not supported by protocol) while connecting to upstream, client: <my desktop's IPv6 address here>, server: domain.net, request: "GET /sonarr/js/simplebar.js HTTP/2.0", upstream: <a class="moz-txt-link-rfc2396E" href="http://192.168.136.135:8989/sonarr/js/simplebar.js">"http://192.168.136.135:8989/sonarr/js/simplebar.js"</a>, host: "domain.net", referrer: <a class="moz-txt-link-rfc2396E" href="https://domain.net/sonarr/">"https://domain.net/sonarr
/"</a>
2019/12/15 22:53:44 [crit] 15662#15662: *2225 bind(<my server's IPv6 address here>) failed (97: Address family not supported by protocol) while connecting to upstream, client: <my desktop's IPv6 address here>, server: domain.net, request: "GET /sonarr/js/functions.js?v=2.0.325 HTTP/2.0", upstream: <a class="moz-txt-link-rfc2396E" href="http://192.168.136.135:8989/sonarr/js/functions.js?v=2.0.325">"http://192.168.136.135:8989/sonarr/js/functions.js?v=2.0.325"</a>, host: "domain.net", referrer: <a class="moz-txt-link-rfc2396E" href="https://domain.net/sonarr/">"https://
domain.net/sonarr/"</a>
2019/12/15 22:53:44 [crit] 15662#15662: *2225 bind(<my server's IPv6 address here>) failed (97: Address family not supported by protocol) while connecting to upstream, client: <my desktop's IPv6 address here>, server: domain.net, request: "GET /sonarr/js/custom.min.js?v=2.0.325 HTTP/2.0", upstream: <a class="moz-txt-link-rfc2396E" href="http://192.168.136.135:8989/sonarr/js/custom.min.js?v=2.0.325">"http://192.168.136.135:8989/sonarr/js/custom.min.js?v=2.0.325"</a>, host: "domain.net", referrer: <a class="moz-txt-link-rfc2396E" href="https://domain.net/sonarr/">"https:
//domain.net/sonarr/"</a>
2019/12/15 22:53:44 [crit] 15662#15662: *2225 bind(<my server's IPv6 address here>) fai
led (97: Address family not supported by protocol) while connecting to upstream, client: <my desktop's IPv6 address here>, server: domain.net, request: "GET /sonarr/api/plugins/js/chat.js?v=2.0.325 HTTP/2.0", upstream: <a class="moz-txt-link-rfc2396E" href="http://192.168.136.135:8989/sonarr/api/plugins/js/chat.js?v=2.0.325">"http://192.168.136.135:8989/sonarr/api/plugins/js/chat.js?v=2.0.325"</a>, host: "domain.net", referrer: <a class="moz-txt-link-rfc2396E" href="https://domain.net/sonarr/">"https://domain.net/sonarr/"</a>
2019/12/15 22:53:44 [crit] 15662#15662: *2225 bind(<my server's IPv6 address here>) failed (97: Address family not supported by protocol) while connecting to upstream, client: <my desktop's IPv6 address here>, server: domain.net, request: "GET /sonarr/api/plugins/js/invites.js?v=2.0.325 HTTP/2.0", upstream: <a class="moz-txt-link-rfc2396E" href="http://192.168.136.135:8989/sonarr/api/plugins/js/invites.js?v=2.0.325">"http://192.168.136.135:8989/sonarr/api/plugins/js/invites.js?v=2.0.325"</a>, host: "domain.net", referrer: <a class="moz-txt-link-rfc2396E" href="https://domain.net/sonarr/">"https://domain.net/sonarr/"</a>
2019/12/15 22:53:44 [crit] 15662#15662: *2225 bind(<my server's IPv6 address here>) failed (97: Address family not supported by protocol) while connecting to upstream, client: <my desktop's IPv6 address here>, server: domain.net, request: "GET /sonarr/api/plugins/js/php-mailer.js?v=2.0.325 HTTP/2.0", upstream: <a class="moz-txt-link-rfc2396E" href="http://192.168.136.135:8989/sonarr/api/plugins/js/php-mailer.js?v=2.0.325">"http://192.168.136.135:8989/sonarr/api/plugins/js/php-mailer.js?v=2.0.325"</a>, host: "domain.net", referrer: <a class="moz-txt-link-rfc2396E" href="https://domain.net/sonarr/">"https://domain.net/sonarr/"</a>
2019/12/15 22:53:44 [crit] 15662#15662: *2225 bind(<my server's IPv6 address here>) failed (97: Address family not supported by protocol) while connecting to upstream, client: <my desktop's IPv6 address here>, server: domain.net, request: "GET /sonarr/api/plugins/js/speedTest.js?v=2.0.325 HTTP/2.0", upstream: <a class="moz-txt-link-rfc2396E" href="http://192.168.136.135:8989/sonarr/api/plugins/js/speedTest.js?v=2.0.325">"http://192.168.136.135:8989/sonarr/api/plugins/js/speedTest.js?v=2.0.325"</a>, host: "domain.net", referrer: <a class="moz-txt-link-rfc2396E" href="https://domain.net/sonarr/">"https://domain.net/sonarr/"</a>
And so on.....
</pre>
    <p>The way I'm reading it is that it is trying to connect from IPv6
      source interface to IPv4 destination interface, and well, that
      obviously doesn't work. Here's my configs<br>
    </p>
    <h5>nginx.conf</h5>
    <pre>user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;

events {
        worker_connections 768;
        # multi_accept on;
}

http {

        ##
        # Basic Settings
        ##

        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 65;
        types_hash_max_size 2048;
        # server_tokens off;

        server_names_hash_bucket_size 1024;
#       proxy_headers_hash_bucket_size: 64;
        # server_name_in_redirect off;

        include /etc/nginx/mime.types;
        default_type application/octet-stream;

        ##
        # SSL Settings
        ##

        ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # Dropping SSLv3, ref: POODLE
        ssl_prefer_server_ciphers on;

        ##
        # Logging Settings
        ##

        access_log /var/log/nginx/access.log;
        error_log /var/log/nginx/error.log warn;

        ##
        # Gzip Settings
        ##

        gzip on;

        # gzip_vary on;
        # gzip_proxied any;
        # gzip_comp_level 6;
        # gzip_buffers 16 8k;
        # gzip_http_version 1.1;
        # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

        ##
        # Virtual Host Configs
        ##

#       include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
}

</pre>
    <h5>excerpt of domain.net.conf</h5>
    <p><br>
    </p>
    <pre>##Orgv2 Let's encrypt vhost - Non SSL 
##vhost_template_v: v1.0.2
##author: elmerfdz

## <a class="moz-txt-link-freetext" href="http://domain.net">http://domain.net</a> redirects to <a class="moz-txt-link-freetext" href="https://domain.net">https://domain.net</a>
#       include config/domain.net/http_server.conf; 
upstream sonarr-upstream { server 192.168.136.135:8989; }
upstream radarr-upstream { server 192.168.136.135:7878; }
upstream tautulli-upstream { server 192.168.136.141:8181; }
upstream webmin-upstream { server 192.168.136.130:10000; }

## Serves <a class="moz-txt-link-freetext" href="https://www.domain.net">https://www.domain.net</a>
server {
        listen 443 ssl http2; listen [::]:443 ssl http2;
        server_name domain.net;
        include /etc/nginx/config/domain.net/ssl.conf; #edit path to your certs
        root /var/www/domain.net/html;
        index index.php index.html index.htm index.nginx-debian.html;
        location ~ /auth-(.*) { rewrite ^/auth-(.*) /api/?v1/auth&group=$1; } #Org Auth
        error_page 400 401 403 404 405 408 500 502 503 504  /?error=$status;  #error page
        location / {try_files $uri $uri/ =404;}
        include config/domain.net/phpblock.conf;  #PHP Block
        location /sonarr/ {
            proxy_pass <a class="moz-txt-link-freetext" href="http://sonarr-upstream">http://sonarr-upstream</a>;
            include config/domain.net/proxy.conf;
            error_page 400 401 403 404 405 408 500 502 503 504  /?error=$status;  #error page
        }
    ssl_certificate /etc/letsencrypt/live/domain.net/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/domain.net/privkey.pem; # managed by Certbot

</pre>
    <h5>And on the off chance you need it, heres proxy.conf</h5>
    <pre>client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_bind $server_addr;
proxy_buffers 32 4k;
#Timeout if the real server is dead
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503;
# Advanced Proxy Config
send_timeout 5m;
proxy_read_timeout 240;
proxy_send_timeout 240;
proxy_connect_timeout 240;
proxy_hide_header X-Frame-Options;
#add_header X-Frame-Option "DENY";
# Basic Proxy Config
proxy_set_header Host $host:$server_port;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_redirect  http://  $scheme://;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_no_cache $cookie_session;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

</pre>
    <p>Let me know if you need any more info. Thanks for the help.<br>
      I really hope this list supports HTML otherwise that's going to a
      mess to read...</p>
    <p>Rhys<br>
    </p>
    <pre>
</pre>
    <div class="moz-cite-prefix">On 12/11/19 1:34 PM, Sergey A. Osokin
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:20191211233437.GC30344@FreeBSD.org.ru">
      <pre class="moz-quote-pre" wrap="">Hi Rhys,

hope you're doing well.

Yes, it's definitely possible.  The following code snippet does the show:

    server {
        listen   [::]:80 default ipv6only=on;
        location / { proxy_pass <a class="moz-txt-link-freetext" href="http://127.0.0.1:8081">http://127.0.0.1:8081</a>; }
    }

    server {
        listen   127.0.0.1:8081;
        location / { return 200 "OK, 127.0.0.1:8081\n"; }
    }


% curl 127.0.0.1:8081
OK, 127.0.0.1:8081
% curl -g -6 <a class="moz-txt-link-rfc2396E" href="http://[::1]/">"http://[::1]/"</a>   
OK, 127.0.0.1:8081

On Wed, Dec 11, 2019 at 11:52:42AM -1000, Rhys Ferris wrote:
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">Not sure if this is possible. I am trying to enable dual stack for my server, which also proxies several other internal services. Nginx is receiving requests on IPv6 fine, but some of my services are IPv4 only. Can Nginx receive the request on IPv6, retrieve the content from IPv4 internally, and the. Serve the context over IPv6?

Thanks

Rhys Ferris
??? 808-257-2252
???? 757-848-7278
???? <a class="moz-txt-link-abbreviated" href="mailto:rhys.j.ferris@gmail.com">rhys.j.ferris@gmail.com</a>
</pre>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
nginx mailing list
<a class="moz-txt-link-abbreviated" href="mailto:nginx@nginx.org">nginx@nginx.org</a>
<a class="moz-txt-link-freetext" href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Sent from Thunderbird on Ubuntu 19.10</pre>
  </body>
</html>