Add firewall.
This commit is contained in:
parent
32951fb41a
commit
5e2fcbfb30
4 changed files with 214 additions and 157 deletions
22
etc/firewall/default_v4.rules
Normal file
22
etc/firewall/default_v4.rules
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# These rules are applied as the default firewall when there are no state rules to be applied.
|
||||
*filter
|
||||
:INPUT DROP [0:0]
|
||||
:FORWARD DROP [0:0]
|
||||
:OUTPUT ACCEPT [0:0]
|
||||
-A INPUT -m conntrack --ctstate INVALID -j DROP
|
||||
-A INPUT -i lo -j ACCEPT
|
||||
-A INPUT -s 10.254.0.0/24 -i eth1 -j ACCEPT
|
||||
-A INPUT -s 5.101.171.208/28 -i eth0 -j ACCEPT
|
||||
-A INPUT -s 172.236.16.105/32 -i eth0 -j ACCEPT
|
||||
-A INPUT -s 185.176.90.169/32 -i eth0 -j ACCEPT
|
||||
-A INPUT -s 145.40.182.204/32 -i eth0 -j ACCEPT
|
||||
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
|
||||
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
|
||||
-A INPUT -p icmp -m icmp --icmp-type 0 -j ACCEPT
|
||||
-A INPUT -p icmp -m icmp --icmp-type 3 -j ACCEPT
|
||||
-A INPUT -p icmp -m icmp --icmp-type 11 -j ACCEPT
|
||||
-A INPUT -p icmp -m icmp --icmp-type 12 -j ACCEPT
|
||||
-A INPUT -p tcp -m multiport --dports 22,25422 -m conntrack --ctstate NEW -j ACCEPT
|
||||
-A INPUT -p tcp -m tcp --dport 873 -m conntrack --ctstate NEW -j ACCEPT
|
||||
-A INPUT -p tcp -m tcp --dport 25443 -m conntrack --ctstate NEW -j ACCEPT
|
||||
COMMIT
|
||||
Loading…
Add table
Add a link
Reference in a new issue