Score:1

nginx fails to listen on specific IPv6 address

nl flag

Ubuntu 20.04.3
nginx version: nginx/1.18.0 (Ubuntu)

Hello,

I just followed a simple procedure to set ngnix to listen to a specific IPv6 address https://geekflare.com/enable-ipv6-nginx-apache/ and we encountered an error. Bellow are some relevant info:

ip a |g inet6
    inet6 ::1/128 scope host 
    inet6 fe80::6e35:7039:2681:db1f/64 scope link noprefixroute 
    inet6 fe80::42:d3ff:feaf:2ad/64 scope link 

change /etc/nginx/sites-available/default to listen to IPv6 address, note the '[]' were included:

listen [fe80::6e35:7039:2681:db1f]:80 default_server;

no other servers listen on p:80:

lsof -i :80 | grep LISTEN

and succesfully fails:

nginx[16359]: nginx: [emerg] bind() to [fe80::6e35:7039:2681:db1f]:80 failed (22: Invalid argument)

solved:

ping fe80::6e35:7039:2681:db1f%wlp4s0
PING fe80::6e35:7039:2681:db1f%wlp4s0(fe80::6e35:7039:2681:db1f%wlp4s0) 56 data bytes
64 bytes from fe80::6e35:7039:2681:db1f%wlp4s0: icmp_seq=1 ttl=64 time=0.074 ms
64 bytes from fe80::6e35:7039:2681:db1f%wlp4s0: icmp_seq=2 ttl=64 time=0.067 ms

Thanks!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.