No default gateway found for ipv6

rmont

Dabbler
Joined
Jun 18, 2020
Messages
42
I keep receiving mail alerts from: Freenas "SERVERNAME" CronTask Run
Content: No default gateway found for ipv6.

Is there a way to disable ipv6? I can't find a way to do it.

Thanks
 

Yorick

Wizard
Joined
Nov 4, 2018
Messages
1,912
Network -> Interfaces, find your interface, expand with the caret on the right, edit, uncheck "Autoconfigure IPv6", save.

That should do it, hopefully.
 

rmont

Dabbler
Joined
Jun 18, 2020
Messages
42
It's already unchecked, unfortunately.

Thanks for helping, though
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
What's your mail server set to? If it's smtp.gmail.com, your DNS may be resolving it to its IPv6 address. See if you can configure your DNS to not resolve IPv6 AAAA records.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Are you running jails with VNET? I just stumbled on this exact message from iocage in a different context (not FreeNAS).
 

rmont

Dabbler
Joined
Jun 18, 2020
Messages
42
Are you running jails with VNET? I just stumbled on this exact message from iocage in a different context (not FreeNAS).

In fact I am. I have multiple jails with VNET enabled, but I checked the configuration and all have the 'autoconfigure ipv6' option unchecked
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Right. Then on the shell try with one of them:
iocage stop <jailname>
iocage start <jailname>
 

rmont

Dabbler
Joined
Jun 18, 2020
Messages
42
What's your mail server set to? If it's smtp.gmail.com, your DNS may be resolving it to its IPv6 address. See if you can configure your DNS to not resolve IPv6 AAAA records.

It's not on google, but on my own domain (hosted on Siteground).
My router is acting as a local DNS and points to Cloudflare for DNS.
IPV6 is disabled on the router.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
My intention was that you should see the error when starting the jail. That's what happens on my system here without IPv6. Please check. Stop and start on the shell. One jail is sufficient.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
@rmont Did you stop and start a jail on the command line? No error message?
 

rmont

Dabbler
Joined
Jun 18, 2020
Messages
42
@Patrick M. Hausen I did now.
In fact, when I restart the Jail I get a message "No default gateway found for ipv6".

I found in the network properties of the jail a couple more options that I changed.
The flag ip6.saddrsel was set and I unchecked it.
And I also found that ipv6 was not explicitly disabled (It was disabled in Basic Properties, but not under Network properties.
I restarted the jail with these 2 options disabled, but it shows the same error "No default gateway...".
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
What removed the message for me was simply to switch on autoconfiguration. If there is no router sending out IPv6 router advertisements, nothing "bad" will happen and you won't get spurious alerts.

HTH,
Patrick
 

rmont

Dabbler
Joined
Jun 18, 2020
Messages
42
Hi Patrick,

I tried this as well, but I still have the same issue.
I guess I will live with the alert... It's not affecting the jail's functionality.
 

Phil1295

Explorer
Joined
Sep 20, 2020
Messages
79
Any fix to this issue please ?
I have a cron job that stops the jail, performs an export image backup, then restarts the jail

The issue is that "No default gateway found for ipv6." is printed to stderr and we get an email error on the cron job whenever it is started, while the job is actually fine

As a workaround, I added this to my cron job script to delete that line from any stderr, while keeping any other eventual error printed to stderr:

Code:
iocage start jail_name 2> >(sed -E '/No default gateway found for ipv6./d' >&2)


This would fix it for anyone like me that is getting pissed by this bug
We should be able to suppress the error when the jail GUI option for IPV6 was disabled !
 

TerranPhil

Dabbler
Joined
Jan 17, 2015
Messages
19
Any fix to this issue please ?
I have a cron job that stops the jail, performs an export image backup, then restarts the jail

The issue is that "No default gateway found for ipv6." is printed to stderr and we get an email error on the cron job whenever it is started, while the job is actually fine

As a workaround, I added this to my cron job script to delete that line from any stderr, while keeping any other eventual error printed to stderr:

Code:
iocage start jail_name 2> >(sed -E '/No default gateway found for ipv6./d' >&2)


This would fix it for anyone like me that is getting pissed by this bug
We should be able to suppress the error when the jail GUI option for IPV6 was disabled !


The following commands removed the error message for me:

Code:
iocage set ip6_addr=none examplejail
iocage set defaultrouter6=none examplejail


Networking — iocage 1.2 documentation
 
Joined
Jan 15, 2021
Messages
8
What worked for me is go to each jail.
Stop it.
Basic properties->IPv6 Default Router set to none.
Save it and start jail.
No more error message.
I did this based on the above recommendation, but you dont need to go into shell.
 
Top