OPNsense Forum

English Forums => Tutorials and FAQs => Topic started by: ErnestoCervantes on May 10, 2019, 07:07:05 pm

Title: Editing /etc/re.cong (or any other configuration files_
Post by: ErnestoCervantes on May 10, 2019, 07:07:05 pm
I am new to Linux/Unix, albeit above-average in Windows/Mac systems.  I am pleased with OPNSense as a solution comparable with more expensive commercial systems.  I am adding plug-in's to expand the usability of the firewall, but I am not familiar on how to access the CLI on a running box; or how/where to find the commands to edit .conf and other files to customize software interoperability and function.
Any help is greatly appreciated as I am anxious to learn how to become proficient in this realm, as I see on the forum very lively, productive and innovative solutions to real-life security issues.
Thank you.
Title: Re: Editing /etc/re.cong (or any other configuration files_
Post by: franco on May 10, 2019, 07:13:53 pm
Use SSH to get access to the box (System: Settings: Administration).

FreeBSD's package manager is "pkg", you can install the following editors...

# pkg install nano
# pkg install emacs-nox
# pkg install joe
# pkg install vim-console

You can edit some files, but not others that OPNsense is forced to use because the particular feature doesn't have overrides. However, /etc/rc.conf is yours to set up according to your wishes for third party services from the packages, but you will not be able to edit network behaviour there.

For in-depth CLI you can check OPNsense configuration file /conf/config.xml and maybe you can achieve what you want there without going through the GUI.

Plugins (GUI + background service) in OPNsense are written like this: https://docs.opnsense.org/development/examples/helloworld.html


Cheers,
Franco