A simple service definition for Consul agents; meant to simplify the installation process of Consul.
This is based on the information provided by Hashicorp in the Consul Docs.
- Download the XML file:
- Either
wget {raw_url} consul.xml
- Or copy and paste the contents into a new file named
consul.xml
- Either
- Install the profile:
sudo firewall-cmd --permanent --new-service-from-file=consul.xml
- Enable the profile:
sudo firewall-cmd --permanent --add-service=consul
- Note: It is up to you to add any zones or other configurations to the line above.
- Reload FirewallD
sudo firewall-cmd --reload
It is important to note that all of these ports are configurable through your Consul agent configuration. This definition is meant to give you a working firewall setup with the default configuration or provide a solid foundation for templating your own definition with your own settings.