Both Hardware and software firewalls have their own advantages and disadvantages.
If you have multiple servers then you should consider Hardware firewall and otherwise software firewall is the option.
Most of the hosting providers do provide firewall protection by default as it helps to determine whether connection is valid or not.
On Linux server CSF (ConfigServer Firewall) is my preferred option due to its easy installation, use and modification.
On Windows servers, its better to use their own firewall as 3rd party application increases the overall load on the server.