To do a particular job, I have added a dual nic card to my mageia workstation, giving me 3 ethernet interfaces.
I am connecting a VOIP phone directly to one of those nics because I need the traffic running through my box so that I can do things to it.
I installed and configured dhcpd, and it is working fine.
Binding the nic with the phone to my internet port is trivial - just one iptables rule, and when I need to I can reroute the data through my box (and through a VM that is in the box) without any difficulty.
However, I want my iptables rule to be automatically invoked when the system boots, so that the system comes up with the phone working. I have written iptables.rules into /etc and I suppose this will cause the rule to be loaded on boot, though I am not sure of that anymore. But I also have shorewall running on this system, and sorting out what it does is a freaking nightmare - and it keeps changing, from release to release.
Now, once upon a time, when we used sysV scripts, I would just have put my iptables rule into rc.local. Where/how do I put this rule in the approved systemd fashion, and can I easily make it a service or some such so that, on those occasions where I stop and restart shorewall I can also easily reinvoke this rule?
This actually is becoming a more general problem for me; I have a number of different rules that I invoke selectively, depending on what my particular needs are, and as a result, I have a number of different scripts that I have to keep sorted out. When I restart the firewall I then have to immediately (and manually) run several different scripts...and this new rule will be another script.
So, what is the approved systemd way to do this?