MYGATE(5)

πŸ“¦ in nixpkgs unstable

πŸ’… MYGATE(5) πŸ’…

okay bestie, welcome to the MYGATE page β€” yeah it's a File Formats Manual situation, and it's genuinely shorter than your attention span, i promise 🫢 lowkey iconic for that.

✨ NAME ✨

mygate β€” your default gateway, the lil file that tells your machine where to send its outbound vibes 🌈

🌸 DESCRIPTION 🌸

so netstart(8) reads the mygate file at system startup time, fr fr. that's the whole plot.

/etc/mygate, if it exists (big if, no cap), contains the address of the gateway host. then the route(8) utility goes ahead and adds that gateway to the routing tables. if /etc/mygate does not exist? no default gateway gets added to the routing tables, periodt. πŸ’€

the file can hold gateway addresses for both IPv4 and IPv6 networks β€” dotted quad notation for v4 (like 192.0.2.1) or colon notation for v6 (like 2001:db8::1). oh and every single address has to be on its own separate line, no cramming them together bestie. πŸŽ€

⚠️ heads up: if more than one address of a specific family is in there, only the first is used β€” all the other addresses of that family get ignored. it's giving "you had one job" 😭

/etc/mygate gets processed after all interfaces have been configured. so if any hostname.if(5) files contain inet autoconf directives, the IPv4 entries in /etc/mygate will be ignored. and if they contain inet6 autoconf directives, the IPv6 entries will be ignored. vibe check passed, but like, conditionally. ✨

also!! arbitrary shell commands can be executed during processing of this file, using !command directives similar to hostname.if(5). this is genuinely so useful for doing additional configuration after all interfaces are configured by netstart(8). main character energy for real. πŸ‘‘

empty lines and lines beginning with # are ignored. ghosted. πŸ™ˆ


πŸ’œ FILES πŸ’œ

  • /etc/mygate β€” Default gateway address(es). that's it, that's the file, she's the moment. πŸ¦‹

πŸ”₯ SEE ALSO πŸ”₯

go read them, iykyk πŸ’…

⭐ HISTORY ⭐

support for the file /etc/mygate first appeared in NetBSD 0.8. a true vintage queen, we stan. πŸ‘‘


okay that's the whole page bestie!! this Debian build of MYGATE(5) is dated March 29, 2025 β€” so yeah, she's fresh out the group chat, go configure your gateway and slay πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from
  • nixpkgs unstable: cvs-export
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms