iptables
Chains
- Tags that define and match packet to the
state >[!Overview] >
k #### Setting default policy
It’s recommended to set up it to accep first and then change it
Filter table
- filtering incoming traffic
- fire wall stuff
Rules
Rules are applied from the top to the bottom
- to list
- to append
- to put on top
Accept - Stop proccesing and allow the packet to flow to the service
Reject - Stop the packet and send feedback to the user
Drop - Drop packet and don’t inform anyone
[!note] If the packet doesn’t match the rule it would be matched by the default rule If no default rule the packet will be accepted
Blocking Ports
NAT table
- Redirect to different interfaces ### Mangle table
- Modifying packets and connections