News for hackers. Stuff that matters.
Re:Nsh, a unified router style CLI for OpenBSD by traceroute66 on Saturday April 09, 2022 @03:41AM (#30965979)
> I would love to have this for an entire OS, not just networking.

To be honest with OpenBSD its not that difficult, and I don't see the point of a tool like NSH for OpenBSD because its so easy to back up and restore all the routing daemon configs.

For your OpenBSD router average setup (from memory, forgive me if I missed something):

     - Copy /etc/rc.conf.local
     - Copy config files for daemons referred to in /etc/rc.conf.local
     - Copy /etc/hostname.if files
     - Copy /etc/mygate (if not using dynamic routing)
     - Copy /etc/resolv.conf
     - Copy /etc/pf.conf
You can also git your /etc of course.

For Linux, really the answer is to use Salt or another config tool to get repeatable configs.

Re:Nsh, a unified router style CLI for OpenBSD by SpaceInvader on Saturday April 09, 2022 @05:19AM (#30966442)
Yes, I agree with that. Recently I've switched my FreeBSD router to OpenBSD, getting it running is trivial and for backups - just few files needs to be rsyncd to my backup machine and that's it.
Re:Nsh, a unified router style CLI for OpenBSD by addingnumbers on Saturday April 09, 2022 @11:20AM (#30968803)
> I don't see the point of a tool like NSH for OpenBSD

I think the point is getting rid of this risk:

> ... forgive me if I missed something

Re:Nsh, a unified router style CLI for OpenBSD by traceroute66 on Saturday April 09, 2022 @02:07PM (#30970422)
> I think the point is getting rid of this risk:

What risk ?

If I am (for example) running an OpenBSD firewall or OpenBSD BGP router then there's nothing to forget. It really is as simple as I said it was.

The "forgive me if I forget" was because I wrote my answer from memory instead of looking at my actual script.

There really is absolutely zero need for NSH or any tool like it on OpenBSD if you're just running a router/firewall.

Re:Nsh, a unified router style CLI for OpenBSD by jlgaddis on Saturday April 09, 2022 @04:42PM (#30971856)
> You can also git your /etc of course.

You can and you should, in my opinion.

However, you really want to use "etckeeper" [0] to do that (as opposed to "maintaining" /etc as a git repo, manually, yourself).

---

ETA:

Seriously, look over etckeeper's README file [1] and/or man page [2]. Next, go read a couple articles or blog posts that describe "How-To store /etc in a git repository on debian linux" [3]. Then, if you're a sado-masochist, go ahead and actually try it that way for a while. Finally, install etckeeper, spend two minutes setting it up (if your packaging tool didn't do that for you automatically), and almost instantly regain your sanity!

---

[0]: http://etckeeper.branchable.com

[1]: http://etckeeper.branchable.com/README/

[2]: https://man.archlinux.org/man/etckeeper.8

[3]: http://hyperprog.com/howto/etc-git.html

Re:Nsh, a unified router style CLI for OpenBSD by INTPenis on Saturday April 09, 2022 @12:07PM (#30969232)
Agreed, in fact I have all of those in Ansible. I've been using OpenBSD as a home router for over a decade.

When I saw the first paragraph of the Nsh Github Readme my initial thought was "why?".