Pf sense configuration from command line.
kaushik209 last edited by
I would like to know is there any way to set pfsense from command line. I need to create aliases and nat from command line.
Is there any way?? If so then in which file contains aliases and nat rules.
Thanks in advance
There is no (easy) way to manage these from the command line. These are not held in a particular file, but they are part of the main config.xml file. You may be able to edit that file and add them in, but it isn't something you'd want to regularly.
There are a few other ways to configure things from the CLI, but they are not optimal. You can use the (included) text browser links to view the web interface (links http://localhost), you could learn the PHP functions to add them via the PHP Developer shell, or you could write a program that adds them on your own.
You may be able to accomplish some of the same things by adding items to a pf table from the CLI, but you'd have to look for existing tables to use (e.g. sshlockout)