Contents
How do I allow firewall rules in Linux?
Example Firewall Rule to Allow Incoming SSH Connections
- Delete Existing Rules. If you already have some iptables rules, take a backup before delete the existing rules. …
- Allow only SSH. Allow only the incoming SSH connection to this server. …
- Drop all Other Packets. …
- View the SSH rule and Test.
How do I change the firewall rule in Linux?
Summary :
- List the current rules of iptables: sudo iptables -L.
- To change the default policy: …
- To clear/flush all the rules. …
- To append a rule at the end of the chain: …
- To append a rule at the start of the chain: …
- To implement a ACCEPT rule:- …
- To implement a DROP rule:- …
- Implementing rules on specific ports/protocols:-