How to set the gateway flag

I’m trying to get the default gateway on my Linux machines and it looks like I need to enable the gateway flag according to this:

gateway of <ipv4 route>	Returns the ipv4 address of the route's gateway if the gateway flag is set, otherwise "0.0.0.0"

Question is, how do I enable the gateway flag? Searching here on the forum yields no results for “gateway flag” and Google isn’t helping much either.

This might mean something internal to the OS or something. I don’t think it is something you set.

I have gone ahead and just grabbed the info via a script and output to a file, then create a property from that file.

1 Like