4 How to Setup Firewall in Linux Flashcards
1
Q
What is the default tool for setting a firewall?
A
iptables - set up, maintain packets filter (in linux kernel)
2
Q
What are chains?
A
- set of rules for particular task (3 for process the traffic)
3
Q
INPUT chains
A
- any traffic from internet towards your local machine has to go through all the rules in INPUT chain
4
Q
OUTPUT chains
A
- any traffic going from your local machine has to go through the output chains
5
Q
FORWARD chains
??? nerozumiem uplne
A
- any traffic going from external network to another network needs to go through FORWARD chains (when two or more PCs are connected and we want to send data between them)
6
Q
What 3 actions does iptable perform on the traffic? (tell about each)
A
ACCEPT
- any traffic going from your local machine has to go through the output chains
DROP
- traffic is unable to pass the rules in specified chain → iptable
blocks the traffic
- firewall is closed
REJECT
- similar to DROP
- it send a message to the sender of the traffic stating the data transfer has failed
7
Q
When to use REJECT and when DROP?
A
- use REJECT - you want to other end to know the port is unreachable
- use DROP - for connections to hosts you do not want people to see