admin:linux:firewalld

Red Hat firewalld

firewall-cmd --add-port=80/tcp
firewall-cmd --permanent --add-service=SERVICENAME
firewall-cmd --reload
firewall-cmd --direct --add-rule <table> <chain> <priority> <args> -c <some comment>
/etc/firewalld/services/inspircd.xml
<?xml version="1.0" encoding="utf-8"?>
<service>
  <short>InspIRCd</short>
  <description>InspIRCd is a project created to provide a stable IRCd which provides a vast number of features in a modularized form.</description>
  <port protocol="tcp" port="6667"/>
  <port protocol="tcp" port="7000"/>
  <port protocol="tcp" port="7776"/>
</service>

daemon

/etc/firewalld/services/syncthing.xml
<?xml version="1.0" encoding="utf-8"?>
<service>
  <short>Syncthing</short>
  <description>Syncthing is a Peer-to-Peer file synchronization service. Enable this option, if you plan to run the Synthing service.</description>
  <port protocol="tcp" port="22000"/>
  <port protocol="udp" port="21027"/>
</service>

web interface

/etc/firewalld/services/syncthing-gui.xml
<?xml version="1.0" encoding="utf-8"?>
<service>
  <short>Syncthing GUI</short>
  <description>Enable this option in addition to the Syncthing option to allow traffic to the Syncthing web interface. (Be sure to secure it accordingly).</description>
  <port protocol="tcp" port="8384"/>
</service>
  • Last modified: 2024-07-05 14:31