Change permanently networksettings
-
Hello,
at first, I am a linuxuser and BSD is brand new stuff.
We have some firewall appliance with pfsense. Now we have an problem with an interface setting. We need to disable "VLAN_HWTAGGING" on one interface.
The man ifconfig give me the parameter "-vlanhwtag" to disable this option.ifconfig fxp1 -vlanhwtag
Thats works fine, but of course after every reboot, we have to run the command again. On a RHEL system, I will edit the "ifcg-eth1" (or better ifcfg-fxp1) file and add the ifconfig command as option. There is something like this in the pfsense system? On FreeBSD I found /etc/rc.conf…
Thanks cami
-
1/ Install Shellcmd package.
2/ Stick what's required under Services - Shellcmdhttps://doc.pfsense.org/index.php/Executing_commands_at_boot_time
-
^ Yep, that.
Since pfSense stores all it's config in a single xml file anything not in that file will likely be lost at some point. That means you can't edit the various conf files as you would for a standard FreeBSD install. All of them are generated from the config.xml file at boot.
Steve
-
Hello,
thank you for the useful informations. I will use the "Shell script option" and write a short script.
Thanks cami
-
Be aware that any script you put in rc.d will be lost on a firmware update. As it says on that wiki page it's preferable to use Shellcmd as that is included in the config file. Especially with a single line of code like you're using.
If you do decide to use a script you might want to consider the filer package:
https://doc.pfsense.org/index.php/Filer_package
That won't work as well as shellcmd since after an update it will have to be re-installed meaning any script won't run at the first boot.Steve