Intern
What is a firewall?
sobes.tech AI
Answer from AI
Hardware or software component that controls incoming and outgoing network traffic based on predefined security rules. It acts as a barrier between trusted and untrusted networks.
Main functions:
- Traffic filtering: Allowing or blocking data packets by IP addresses, ports, protocols.
- Access control: Restricting access to resources.
- Logging: Recording information about network traffic for analysis and auditing.
- Intrusion prevention: Some firewalls have IDPS (Intrusion Detection and Prevention System) features.
Examples of software firewalls in Linux:
iptablesfirewalld
Example of an iptables rule to allow incoming traffic on port 22 (SSH):
# Allow incoming connections on port 22
iptables -A INPUT -p tcp --dport 22 -j ACCEPT