[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: disable IPv6 debian



On Fri, 15 Apr 2022, Greg Wooledge wrote:

On Fri, Apr 15, 2022 at 11:21:46AM -0400, Chuck Zmudzinski wrote:
Another improvement to the script would be to have the script toggle the
default route on or off, depending on the existence or not of the default
route, for the case when there is no argument to the script.

That requires some way to *determine* the current state.  Parsing the
routing table, perhaps?  If you could tell us how to do that, it might
help.



Try this (untested as I'm remote and don't want to remove my default
route!)

[[ -z "$( ip -6 route show exact default )" ]] && echo no

Hopefully will print no if there is no default route.

Tim.


Reply to: