Hello everyone, I wanted to know if there is a way to create a script like this:
The default route is an IP gateway to capture the responsible interface and put it in a variable.
As in the image, if the script detects that the gateway is an ip, it captures the physical interface ether1 and puts the value ether1 in a variable