4

I want to know how i can completely configure and add add tables to pfsense via ssh. my goal is to have a web installer that configured multiple system and based on the output it will configure the pfsense firewall.

via the ssh, configure wan, lan automatically enable port 80, 22, etc. based on a conf.txt configuration file.

Thanks

5

Perhaps its easier when you have a look at ansible and playbooks. There are some playbooks for pfsense and i think you find some more. There you can make templates and configure your firewall over ssh with ansible.

https://github.com/amatas/ansible-pfsense
http://docs.ansible.com/playbooks.html

0

The pfSense php shell might help you out. Docs at https://doc.pfsense.org/index.php/Using_the_PHP_pfSense_Shell

It appears to allow you to edit and view the config from the ssh shell.

0

The AutoConfigBackup module may suit your use case.

It stores the complete configuration of pfSense in a single XML file.

You could grab, modify and push this file to as many pfSense instances as you want.

<?xml version="1.0"?>
<pfsense>
    <version>11.9</version>
    <lastchange/>
    <theme>pfsense_ng</theme>
    <sysctl>
        <item>
            <descr><![CDATA[Disable the pf ftp proxy handler.]]></descr>
            <tunable>debug.pfftpproxy</tunable>
            <value>default</value>
        </item>
        ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.