OpenBSD manual page server

Manual Page Search Parameters

MYGATE(5) File Formats Manual MYGATE(5)

mygatedefault gateway

The mygate file is read by netstart(8) at system startup time.

/etc/mygate, if it exists, contains the address of the gateway host. The gateway is added to the routing tables by the route(8) utility. If /etc/mygate does not exist, no default gateway is added to the routing tables. The file may contain gateway addresses for both IPv4 and IPv6 networks in dotted quad notation for v4 (e.g. 192.0.2.1) or in colon notation for v6 (e.g. 2001:db8::1). Each address must be specified on a separate line. If more than one address of a specific family is found, only the first is used - all other addresses of that family are ignored.

/etc/mygate is processed after all interfaces have been configured. If any hostname.if(5) files contain “dhcp” directives, IPv4 entries in /etc/mygate will be ignored. If they contain “autoconf” directives, IPv6 entries will be ignored.

Additionally, arbitrary shell commands can be executed during processing of this file, using !command directives similar to hostname.if(5). This is useful for doing additional configuration after all interfaces are configured by netstart(8).

Empty lines and lines beginning with ‘#’ are ignored.

/etc/mygate
Default gateway address(es).

hostname.if(5), netstart(8), route(8)

This manual page first appeared in OpenBSD 3.4.

November 29, 2020 OpenBSD-7.0