Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Search
    • Register
    • Login
    Introducing Netgate Nexus: Multi-Instance Management at Your Fingertips.

    Perform changes/settings from CLI/Shell?

    Scheduled Pinned Locked Moved General pfSense Questions
    7 Posts 3 Posters 4.6k Views
    Loading More Posts
    • 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.
    • C
      CDuv
      last edited by

      I've recently been unable to use webGUI (because of down Internet connections making the webGUI unresponsive: unavailable LDAP auth server I guess) but SSH shell was working fine.

      Is there a proper way to perform via the shell the same actions available to me via the webGUI?

      Example:

      • Set gateway monitoring IP/delays
      • Add/remove gateways from Gateway Groups
      • Add/edit/remove firewall rules
      1 Reply Last reply
      Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by

        You can do all that by running the correct commands in the developer shell (option 12 in the console menu):
        https://doc.pfsense.org/index.php/Using_the_PHP_pfSense_Shell

        You can also edit the config file directly and then force a config reload.

        Both those options are open to error!  ;)

        Steve

        1 Reply Last reply
        Reply Quote 0
        • C
          CDuv
          last edited by

          A viconfig && /etc/rc.reload_all would then be the best solution?

          1 Reply Last reply
          Reply Quote 0
          • stephenw10S
            stephenw10 Netgate Administrator
            last edited by

            Yes, that should work, if you're familiar with vi. (Did you mean vi config?)

            ee /conf/config.xml
            

            For the rest of us!  ;)

            As I said this is very open to some typo that breaks your box.

            Steve

            1 Reply Last reply
            Reply Quote 0
            • D
              divsys
              last edited by

              Actually, it looks like a new alias snuck into the command line.

              viconfig

              Now automatically opens vi on /cf/conf/config.xml, quite handy.
              I don't know exactly which version brought it in, but it's definitely in 2.1.3.
              I'm still hunting down exactly where it gets linked in, for now it's an Easter Egg….. ;)

              Edit: There she be - /usr/local/bin/viconfig (gawd, it's been around since 1.2.X! at least 6 years)

              Ah, the things you learn.....

              -jfp

              1 Reply Last reply
              Reply Quote 0
              • C
                CDuv
                last edited by

                @divsys:

                Ah, the things you learn…..

                Glad I could give some knowledge back ;)

                1 Reply Last reply
                Reply Quote 0
                • stephenw10S
                  stephenw10 Netgate Administrator
                  last edited by

                  Yep, did not know that. Thanks.  :)

                  Ready for eeconfig though!

                  Steve

                  1 Reply Last reply
                  Reply Quote 0

                  Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                  Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                  With your input, this post could be even better 💗

                  Register Login
                  • First post
                    Last post
                  Copyright 2026 Rubicon Communications LLC (Netgate). All rights reserved.
                  Privacy Policy · Cookie Policy