1*6e526614Skn.\" $OpenBSD: mygate.5,v 1.2 2021/10/17 13:20:46 kn Exp $ 24f9a4669Sderaadt.\" 34f9a4669Sderaadt.\" Copyright (c) 2003 Jason McIntyre <jmc@openbsd.org> 44f9a4669Sderaadt.\" 54f9a4669Sderaadt.\" Permission to use, copy, modify, and distribute this software for any 64f9a4669Sderaadt.\" purpose with or without fee is hereby granted, provided that the above 74f9a4669Sderaadt.\" copyright notice and this permission notice appear in all copies. 84f9a4669Sderaadt.\" 94f9a4669Sderaadt.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 104f9a4669Sderaadt.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 114f9a4669Sderaadt.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 124f9a4669Sderaadt.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 134f9a4669Sderaadt.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 144f9a4669Sderaadt.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 154f9a4669Sderaadt.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 164f9a4669Sderaadt.\" 17*6e526614Skn.Dd $Mdocdate: October 17 2021 $ 184f9a4669Sderaadt.Dt MYGATE 5 194f9a4669Sderaadt.Os 204f9a4669Sderaadt.Sh NAME 214f9a4669Sderaadt.Nm mygate 224f9a4669Sderaadt.Nd default gateway 234f9a4669Sderaadt.Sh DESCRIPTION 244f9a4669SderaadtThe 254f9a4669Sderaadt.Nm mygate 264f9a4669Sderaadtfile is read by 274f9a4669Sderaadt.Xr netstart 8 284f9a4669Sderaadtat system startup time. 294f9a4669Sderaadt.Pp 304f9a4669Sderaadt.Pa /etc/mygate , 314f9a4669Sderaadtif it exists, 324f9a4669Sderaadtcontains the address of the gateway host. 334f9a4669SderaadtThe gateway is added to the routing tables by the 344f9a4669Sderaadt.Xr route 8 354f9a4669Sderaadtutility. 364f9a4669SderaadtIf 374f9a4669Sderaadt.Pa /etc/mygate 384f9a4669Sderaadtdoes not exist, no default gateway is added to the routing tables. 394f9a4669SderaadtThe file may contain gateway addresses for both IPv4 and IPv6 networks 404f9a4669Sderaadtin dotted quad notation for v4 414f9a4669Sderaadt.Pq e.g. 192.0.2.1 424f9a4669Sderaadtor in colon notation for v6 434f9a4669Sderaadt.Pq e.g. 2001:db8::1 . 444f9a4669SderaadtEach address must be specified on a separate line. 454f9a4669SderaadtIf more than one address of a specific family is found, 464f9a4669Sderaadtonly the first is used \- all other addresses of that family are ignored. 474f9a4669Sderaadt.Pp 484f9a4669Sderaadt.Pa /etc/mygate 494f9a4669Sderaadtis processed after all interfaces have been configured. 504f9a4669SderaadtIf any 514f9a4669Sderaadt.Xr hostname.if 5 524f9a4669Sderaadtfiles contain 53*6e526614Skn.Dq inet autoconf 544f9a4669Sderaadtdirectives, 554f9a4669SderaadtIPv4 entries in 564f9a4669Sderaadt.Pa /etc/mygate 574f9a4669Sderaadtwill be ignored. 584f9a4669SderaadtIf they contain 59*6e526614Skn.Dq inet6 autoconf 604f9a4669Sderaadtdirectives, 614f9a4669SderaadtIPv6 entries will be ignored. 624f9a4669Sderaadt.Pp 634f9a4669SderaadtAdditionally, arbitrary shell commands can be executed during processing 644f9a4669Sderaadtof this file, using 654f9a4669Sderaadt.Ar \&! Ns Ar command 664f9a4669Sderaadtdirectives similar to 674f9a4669Sderaadt.Xr hostname.if 5 . 684f9a4669SderaadtThis is useful for doing additional configuration after all interfaces 694f9a4669Sderaadtare configured by 704f9a4669Sderaadt.Xr netstart 8 . 714f9a4669Sderaadt.Pp 724f9a4669SderaadtEmpty lines and lines beginning with 734f9a4669Sderaadt.Sq # 744f9a4669Sderaadtare ignored. 754f9a4669Sderaadt.Sh FILES 764f9a4669Sderaadt.Bl -tag -width "/etc/mygate" -compact 774f9a4669Sderaadt.It Pa /etc/mygate 784f9a4669SderaadtDefault gateway address(es). 794f9a4669Sderaadt.El 804f9a4669Sderaadt.Sh SEE ALSO 814f9a4669Sderaadt.Xr hostname.if 5 , 824f9a4669Sderaadt.Xr netstart 8 , 834f9a4669Sderaadt.Xr route 8 844f9a4669Sderaadt.Sh HISTORY 854f9a4669SderaadtThis manual page first appeared in 864f9a4669Sderaadt.Ox 3.4 . 87