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

Perform changes/settings from CLI/Shell?

Scheduled Pinned Locked Moved General pfSense Questions
7 Posts 3 Posters 3.1k 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 May 31, 2014, 5:42 PM

    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
    • S
      stephenw10 Netgate Administrator
      last edited by Jun 1, 2014, 12:04 PM

      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 Jun 1, 2014, 4:31 PM

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

        1 Reply Last reply Reply Quote 0
        • S
          stephenw10 Netgate Administrator
          last edited by Jun 1, 2014, 4:52 PM

          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 Jun 1, 2014, 5:39 PM Jun 1, 2014, 5:23 PM

            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 Jun 1, 2014, 5:53 PM

              @divsys:

              Ah, the things you learn…..

              Glad I could give some knowledge back ;)

              1 Reply Last reply Reply Quote 0
              • S
                stephenw10 Netgate Administrator
                last edited by Jun 1, 2014, 6:58 PM

                Yep, did not know that. Thanks.  :)

                Ready for eeconfig though!

                Steve

                1 Reply Last reply Reply Quote 0
                7 out of 7
                • First post
                  7/7
                  Last post
                Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                  This community forum collects and processes your personal information.
                  consent.not_received