Basic rules for servers
Allow only the ports the service needs (for example 443 for HTTPS), restrict administrative access such as SSH to known addresses or a VPN, block database ports from the internet, and log rejected traffic.
Types
Network firewalls protect offices and cloud networks, host firewalls protect individual machines, and web application firewalls inspect web traffic for attacks.
Questions, answered
No. Updates, strong authentication, backups and monitoring are also essential.
Yes, through security groups or network rules, which must be configured carefully.