systems:media_server:secure_the_server:setup_a_firewall
This is an old revision of the document!
Table of Contents
Systems - Media Server - Secure the Server - Setup a Firewall
Create a systemd service for the firewall
Create a new systemd unit file, named /etc/systemd/system/sharewiz-firewall.service:
- /etc/systemd/system/sharewiz-firewall.service
[Unit] Description=Runs the firewall. [Service] ExecStart=/sharewiz/firewall/firewall.sh Type=oneshot RemainAfterExit=yes [Install] #WantedBy=multi-user.target WantedBy=default.target
NOTE: Ensure that the script that is going to be run is executable.
Reload and enable the firewall.service unit
sudo chmod 644 /etc/systemd/system/sharewiz-firewall.service sudo systemctl daemon-reload sudo systemctl enable sharewiz-firewall.service
NOTE: The systemctl daemon-reload command reloads all unit files, including the new unit file created for the firewall.
References
systems/media_server/secure_the_server/setup_a_firewall.1748685546.txt.gz · Last modified: 2025/05/31 09:59 by peter