Firewall under Debian setup so it works
- Log in to Debian as the Administrator and open the Terminal.
- Type the command "nano /etc/iptables.firewall.rules", to activate the Firewall.

 Debian: setting up Firewall
 
Commands and rules insert
This file is still empty. Insert in the file the following commands and rules:
- *filter
- -A INPUT-i lo -j ACCEPT
- -A INPUT-d 127.0.0.0/8 -j REJECT
- -A INPUT-m state --state ESTABLISHED,RELATED -j ACCEPT
- -A INPUT-p tcp --dport 80 -j ACCEPT
- -A INPUT-p tcp --dport 443 -j ACCEPT
- -A INPUT-p tcp -m state --state NEW --dport 22 -j ACCEPT
- -A INPUT-p icmp -j ACCEPT
- -A INPUT -m limit --limit 5/min -j LOG --log-prefix "iptables denied:" --log-level 7
- -A OUTPUT-j ACCEPT
- -A INPUT-j DROP
- -A FORWARD -j DROP
- COMMIT
- Save the Changes with [Ctrl] + [O] and exit Nano Editor with [Ctrl] + [X].
Further steps: Firewall under Debian setup
- You have saved the Changes, you need to you with "iptables-restore < /etc/iptables.firewall.rules" import.
- Thus, the rules are automatically enabled, enter the command "nano /etc/network/if-pre-up.d/firewall" a.
- Here, you will then need to add the following to make it work:
- #!/bin/sh
- /sbin/iptables-restore < /etc/iptables.firewall.rules
- With "chmod +x /etc/network/if-pre-up.d/firewall" make the file executable and the Firewall is ready to be decorated.
In our next tip we will show you how to work under Debian Linux, a Kernel Update to perform.






