ip4_auto_default_route


Description:

[ NoAccessorMethod ]
[ Version ( since = "1.20" ) ]
public Ternary ip4_auto_default_route { get; set; }

Whether to enable special handling of the IPv4 default route.

If enabled, the IPv4 default route from wireguard.peer-routes will be placed to a dedicated routing-table and two policy routing rules will be added. The fwmark number is also used as routing-table for the default-route, and if fwmark is zero, an unused fwmark/table is chosen automatically. This corresponds to what wg-quick does with Table=auto and what WireGuard calls "Improved Rule-based Routing".

Note that for this automatism to work, you usually don't want to set ipv4.gateway, because that will result in a conflicting default route.

Leaving this at the default will enable this option automatically if ipv4.never-default is not set and there are any peers that use a default-route as allowed-ips. Since this automatism only makes sense if you also have a peer with an /0 allowed-ips, it is usually not necessary to enable this explicitly. However, you can disable it if you want to configure your own routing and rules.




2022 vala-language.org