Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Cyborg)
  • No Skin
Collapse
Brand Logo

CIRCLE WITH A DOT

  1. Home
  2. Uncategorized
  3. I’ve been replacing sudo/doas on most of my FreeBSD boxes with something much smaller: mdo(1) + mac_do(4) from base.

I’ve been replacing sudo/doas on most of my FreeBSD boxes with something much smaller: mdo(1) + mac_do(4) from base.

Scheduled Pinned Locked Moved Uncategorized
freebsdrunbsdmdomacdosysadmin
5 Posts 4 Posters 0 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • larvitz@burningboard.netL This user is from outside of this forum
    larvitz@burningboard.netL This user is from outside of this forum
    larvitz@burningboard.net
    wrote last edited by
    #1

    I’ve been replacing sudo/doas on most of my FreeBSD boxes with something much smaller: mdo(1) + mac_do(4) from base.

    No port. No sudoers parser. No setuid helper. Just a kernel MAC policy, a sysctl rule, and an explicit “SSH is the gate” security model.

    Wrote up the full walkthrough for FreeBSD 15, including rule syntax, examples, caveats, and my surrounding hardening sysctls:

    Link Preview Image
    mdo on FreeBSD 15: Base-System Privilege Delegation with mac_do

    FreeBSD 15 ships mdo(1) and the mac_do(4) policy module in the base system. It replaces sudo and doas for most of my hosts, needs no ports, and configures wi...

    favicon

    Larvitz Blog (blog.hofstede.it)

    #FreeBSD #runbsd #mdo #mac_do #sysadmin #security

    jan@social.eden.oneJ adamshostack@infosec.exchangeA vito@ruby.socialV 3 Replies Last reply
    1
    0
    • larvitz@burningboard.netL larvitz@burningboard.net

      I’ve been replacing sudo/doas on most of my FreeBSD boxes with something much smaller: mdo(1) + mac_do(4) from base.

      No port. No sudoers parser. No setuid helper. Just a kernel MAC policy, a sysctl rule, and an explicit “SSH is the gate” security model.

      Wrote up the full walkthrough for FreeBSD 15, including rule syntax, examples, caveats, and my surrounding hardening sysctls:

      Link Preview Image
      mdo on FreeBSD 15: Base-System Privilege Delegation with mac_do

      FreeBSD 15 ships mdo(1) and the mac_do(4) policy module in the base system. It replaces sudo and doas for most of my hosts, needs no ports, and configures wi...

      favicon

      Larvitz Blog (blog.hofstede.it)

      #FreeBSD #runbsd #mdo #mac_do #sysadmin #security

      jan@social.eden.oneJ This user is from outside of this forum
      jan@social.eden.oneJ This user is from outside of this forum
      jan@social.eden.one
      wrote last edited by
      #2

      @Larvitz Thanks for this, mdo is exactly what I was looking for. One question regarding your net.link.bridge.pfil_* recommendation: pf on my hosts filters on the bridge interface (1) instead of the member interfaces (0) - what are the advantages of turning this setup around?

      1 Reply Last reply
      0
      • larvitz@burningboard.netL larvitz@burningboard.net

        I’ve been replacing sudo/doas on most of my FreeBSD boxes with something much smaller: mdo(1) + mac_do(4) from base.

        No port. No sudoers parser. No setuid helper. Just a kernel MAC policy, a sysctl rule, and an explicit “SSH is the gate” security model.

        Wrote up the full walkthrough for FreeBSD 15, including rule syntax, examples, caveats, and my surrounding hardening sysctls:

        Link Preview Image
        mdo on FreeBSD 15: Base-System Privilege Delegation with mac_do

        FreeBSD 15 ships mdo(1) and the mac_do(4) policy module in the base system. It replaces sudo and doas for most of my hosts, needs no ports, and configures wi...

        favicon

        Larvitz Blog (blog.hofstede.it)

        #FreeBSD #runbsd #mdo #mac_do #sysadmin #security

        adamshostack@infosec.exchangeA This user is from outside of this forum
        adamshostack@infosec.exchangeA This user is from outside of this forum
        adamshostack@infosec.exchange
        wrote last edited by
        #3

        @Larvitz really interesting, thank you for the writeup!

        1 Reply Last reply
        0
        • R relay@relay.publicsquare.global shared this topic
        • larvitz@burningboard.netL larvitz@burningboard.net

          I’ve been replacing sudo/doas on most of my FreeBSD boxes with something much smaller: mdo(1) + mac_do(4) from base.

          No port. No sudoers parser. No setuid helper. Just a kernel MAC policy, a sysctl rule, and an explicit “SSH is the gate” security model.

          Wrote up the full walkthrough for FreeBSD 15, including rule syntax, examples, caveats, and my surrounding hardening sysctls:

          Link Preview Image
          mdo on FreeBSD 15: Base-System Privilege Delegation with mac_do

          FreeBSD 15 ships mdo(1) and the mac_do(4) policy module in the base system. It replaces sudo and doas for most of my hosts, needs no ports, and configures wi...

          favicon

          Larvitz Blog (blog.hofstede.it)

          #FreeBSD #runbsd #mdo #mac_do #sysadmin #security

          vito@ruby.socialV This user is from outside of this forum
          vito@ruby.socialV This user is from outside of this forum
          vito@ruby.social
          wrote last edited by
          #4

          @Larvitz great write up! Definitely bookmarked here! Thank you!

          1 Reply Last reply
          0
          • larvitz@burningboard.netL This user is from outside of this forum
            larvitz@burningboard.netL This user is from outside of this forum
            larvitz@burningboard.net
            wrote last edited by
            #5

            @feld thank you for pointing that out. Article is updated with a note. I attributed you in the top of the article for the helpful feedback!

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups