Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    Perform changes/settings from CLI/Shell?

    General pfSense Questions
    3
    7
    1306
    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
      • stephenw10
        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
          • stephenw10
            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.....

              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
                • stephenw10
                  stephenw10 Netgate Administrator last edited by

                  Yep, did not know that. Thanks.  :)

                  Ready for eeconfig though!

                  Steve

                  1 Reply Last reply Reply Quote 0
                  • First post
                    Last post

                  Products

                  • Platform Overview
                  • TNSR
                  • pfSense
                  • Appliances

                  Services

                  • Training
                  • Professional Services

                  Support

                  • Subscription Plans
                  • Contact Support
                  • Product Lifecycle
                  • Documentation

                  News

                  • Media Coverage
                  • Press
                  • Events

                  Resources

                  • Blog
                  • FAQ
                  • Find a Partner
                  • Resource Library
                  • Security Information

                  Company

                  • About Us
                  • Careers
                  • Partners
                  • Contact Us
                  • Legal
                  Our Mission

                  We provide leading-edge network security at a fair price - regardless of organizational size or network sophistication. We believe that an open-source security model offers disruptive pricing along with the agility required to quickly address emerging threats.

                  Subscribe to our Newsletter

                  Product information, software announcements, and special offers. See our newsletter archive to sign up for future newsletters and to read past announcements.

                  © 2021 Rubicon Communications, LLC | Privacy Policy